| Rather than changing express's syntax, I would much rather have a better express boilerplate generator with an opinionated stack with good documentation/justification. I recently started learning express/node and wasted weeks googling for blog posts for each dependency to figure out how to configure them. I guess this is somewhat valuable for end-to-end understanding but not for productivity. There are a bunch dependencies I am now kind of decided on (not for technical reasons, but because they are clear popularity contest winners) and figured out how use: body-parser
compression
serve-favicon
express-session
csurf
helmet
cors
dotenv
moment
selfsigned
chalk
debug
But still a bunch that I haven't gotten to googling and still need to decide on what to choose: logging (morgan vs winston)
validation (express-validator, joi)
auth (passport jwt, local, social)
session storage (redis vs keeping it in database?)
database (mongo/mongoose vs pg/knex/bookshelf/sequelize, graphql)
storage (s3 vs gcs)
ajax requests (request vs axios)
mail (mailgun, sendgrid, mailchimp)
error handlers
rate limiting
geo ip
I would be so happy if someone took away my power to choose and just forced me to use something that will "just work". |
I highly recommend js-joda, particularly if you’ll ever be computing/showing things to your users in different time zones. It actually treats dates and times rigorously, and has an api that makes it clear what kinds of operations make sense to do on a zoned vs local datetime and makes things like converting between timezones vs transposing them explicit and simple.