3 ms·
CouchDB's HTTP API used to fit in just one file (less than 1k lines of Erlang), and it was a great jumping-off point for learning databases and web programming:
by jchrisa 2y ago
CouchDB's HTTP API used to fit in just one file (less than 1k lines of Erlang), and it was a great jumping-off point for learning databases and web programming: https://github.com/apache/couchdb/blob/0.8.1/src/couchdb/couch_httpd.erl https://github.com/apache/couchdb/blob/0.8.1/src/couchdb/cou...
It was written by one engineer, and then later refactored by a team to look like this (and many other files): https://github.com/apache/couchdb/blob/main/src/chttpd/src/chttpd_db.erl https://github.com/apache/couchdb/blob/main/src/chttpd/src/c...
It's an interesting exercise to see how something grows and changes as it transitions from inspiration to real-world usage.
- phito 2y agoSo little blank lines, I need to breathe