Mapping of HTTP Status Messages in Node.js
π‘ Want to send a message along with an HTTP status code response?
ππΌ @nodejs has a built-in mapping of HTTP status codes and their respective messages.
A collection of 123 tips that come in real handy when you need them. Originally posted as tweets on my Twitter account, and now gathered here so you can browse them easily.
π‘ Want to send a message along with an HTTP status code response?
ππΌ @nodejs has a built-in mapping of HTTP status codes and their respective messages.
π‘ What's a good example of a mid/large Node.js open-source project to learn from?
ππΌ I recently found out that Send from the folks at @mozilla is written in Node.js and it's open-source!
https://github.com/mozilla/send
Read tip
π‘"How do you accomplish X with Nginx?"
ππΌ This useful collection of common Nginx snippets covers many uses cases.
https://github.com/lebinh/nginx-conf
Read tip
π‘Want to get rid of NPM update notifications?
β‘οΈ npm config set update-notifier false
π‘ Many folks trip over the Regex syntax. Writing a working regular expression involves many trials & errors.
ππΌ I always prefer writing #regex in playgrounds so I can immediately test them, of which @regex101 is my favourite.
π‘ A JSON file is the simplest form of storage and a quick way to start your next project.
ππΌ lowdb by @typicode is built on top of lodash offering a familiar API. Ideal for quick prototypes and CLIs.
https://github.com/typicode/lowdb
Read tip
π‘ Need to generate unique IDs that will be shown to users? Don't like the awkwardly long MongoDB IDs?
ππΌ nanoid by @sitnikcode does just that. This super tiny lib (0.008kb!) is secure and has a low collision %.
π‘ Nginx configuration files can quickly become long and difficult to maintain.
ππΌ Break up configuration into standalone units and place them in /etc/nginx/snippets. Use the "include" directive to import them.
π‘ You might have read some articles using apt and others apt-get. What's the difference?
ππΌ apt is a newer and higher level API that combines commonly used commands from apt-get and apt-cache. It's more user-friendly and the recommended tool to use.
π‘ Always fiddling and guessing glob patterns like I do? Never truly grasping the syntax.
ππΌ Glob tool by @digitalocean lets you quickly test globs against sets of strings. It even has examples for commonly used glob patterns.
https://www.digitalocean.com/community/tools/glob
Read tip