re: How would you build a full stack Node.js web app today? VIEW POST


I did just this a few months ago:

Primary database: Postgres, unless there's a pressing reason to use something else
Data access layer: assuming Postgres, Massive (my own project)
Web framework: koa; Express may be more popular in this category but koa supports async route functions
Templating: koa-views with pug
Frontend JS: jQuery, if that
Styling: CSS preprocessors seem pretty interchangeable, I haven't had a reason to use anything other than LESS
Build: npm scripts

Routes are organized so that state changes always happen through a dedicated API route instead of POSTing to a route that redirects or renders. This ensures other frontends can still use the system (assuming they authenticate), and means it's pretty easy to drop a more complex single-page frontend solution in should the need arise.

TypeScript might be nice if you have a sufficiently large team but for the most part I think of JavaScript's lack of static guardrails a feature, not a bug.


Very insightful, thank you! Kudos for Massive

code of conduct - report abuse