Hacker News new | past | comments | ask | show | jobs | submit login

Very nice, I found myself nodding along with almost everything in this post. One thing I do a bit differently is that I usually put the API handlers in their own module (they're usually just a couple lines of code each), along with domain-to-api model transformers. This is because I often have various worker entry points as well, and it's nice to keep the domain logic separate from all the different entry points. I also like to keep all routes in a single file. I don't like to hunt down the full route path across a bunch of different files, and I like to be able to get a full overview of the API in one place. Just different tradeoffs I guess



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: