Echo JS 0.11.0

<~>

tracker1 comments

tracker1 2371 days ago. link 1 point
I've seen good, bad and ugly via dev.to, similar to medium.
tracker1 2373 days ago. link 2 points
TFA uses Contentful, a commercial service.  Which is against the rules, strictly speaking, but the content in the article is useful, so I added a [PAID SERVICE] tag in the title instead of outright deleting the post.
tracker1 2373 days ago. link 1 point
Additional reading "The 12 factor app" https://12factor.net/ part 3.

Beyond this, TFA fails to mention you should have `.env` in your .gitignore file and *NOT* check this into source control.  Generally speaking, I will create defaults that will work without a .env file locally if possible.  I will, however, create `.env.template.env` and `.env.dev.env` files.. the prefix is to keep them together, the suffix is for my editor's plugins.  The template version, I have setup for string replacement for CI/CD integration in a non-container environment... the dev version is for local development, with non-secure resources/passwords etc that are only for local dev.

Here's some boilerplate that I am using.

https://gist.github.com/tracker1/7fd48e818f3b80c8266f04029e989f59
tracker1 2373 days ago. link 1 point
Relatively thin article, mostly on how to use ServiceWorker for caching/offline use... other things to look into as a followup are online/offline detection and local-remote data sources.  May also want to look into pouchdb and other options for data syncing.

Aside: haven't looked into it... but have wanted to try to get a couchdb setup or proxy where there are read-only data sources that cache locally, and read/write data sources that sync per-user via couch/pouch.  Of course there's also other potential issues depending on use case.
tracker1 2373 days ago. link 1 point
#4 favor async/await and Promises in any modern codebase, this has been in Node for a while without a flag.

#5 is express specific... aside: if your API is meant explicitly for your front end, I would reverse proxy a slice for `/api` from your front end host if you can.  This does mean you won't be expressly static-only for the front end, but you do avoid a class of headaches and can do other stuff such as SSR, donut rendering and other caching or output customizations.
tracker1 2375 days ago. link 1 point
Still more of a fan of dokku on Digital Ocean, Linode or similar for smaller/personal projects.

Using a $15/mo droplet on DO, with a 100GB volume and backups ($28/mo) and it handles half a dozen personal projects with room for more.
tracker1 2377 days ago. link 1 point
Really nice to see this... would also be nice to see a shim library that isn't too big that takes care of the abstraction for you... this way if you're on a desktop browser without the sharing API, you can present the common social media sharing buttons if the API isn't available.
[more]