sindresorhus/awesome-nodejs - github.com
ryanmcdermott/clean-code-javascript - github.com
i0natan/nodebestpractices - github.com
Node.js Best Practices : Matt Goldspink 20160829
npm init
.npmrc
package.json
Node.js Best Practices - How to Become a Better Developer in 2017 : blog.risingstack.com
nvm vs n! - .gitignore - 20170522
How I manage multiple Node.js versions - steelbrain.me - 20160719
The Best Way to Install Node.js - yoember.com - 20180929
Taken from stackoverflow answer from nvm
maintainer
The most-used version managers for node are without a doubt http://nvm.sh, https://www.npmjs.com/package/nave, and https://www.npmjs.com/package/n.
nvm
is for modifying individual shell sessions to use the version you want.nave
is for launching subshells with the version you want loaded. n is for switching a single system-wide version of node.
nvm
uses a.nvmrc
file, which like.ruby-version
, contains the version-ish string X you'd normally couple withnvm use X
ornvm install X
.nvm use
ornvm install
by itself will locate the.nvmrc
file, as will simply sourcingnvm
upon opening a new shell.It appears
nave
supports a.naverc
file, but I'm not too familiar with its usage.
n
doesn't appear to support any such config, but as it's system-wide, it doesn't really make as much sense to do so.
avn
supports.node-version
and attempts to provide automatic version switching by hooking intocd
, afternvm
decided that was too invasive a behavior to include.
nvm
NVM Automatic Switching : gist
n
Node.js version management: no subshells, no profile setup, no convoluted API, just simple.
Super easy but system wide.
List installed version
n
Output :
0.8.14
ο 0.8.17
0.9.6
Change the active version by selecting the line and hit space bar.
Install desired node version with n <version>
ex n 10.2.1
.
Possible issue with npm
, any npm
command will output this :
npm WARN lifecycle npm is using /home/<HOME_DIR>/n/bin/node but there is no node binary in the current PATH. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
Fixed by adding a .npmrc file in the project root dir containing :
scripts-prepend-node-path=true
node
package with npx
using a node package inside package.json
cf tweet
- DRY sur le config projet (eslint, code quality, etc ...)
- automatisation des conventions
- 12 factors
- logging
- swagger
- unit / functionnal testing
- CI (circle & jenkins)
- deploy
- health checking
- métriques métiers
Advanced Node.js Project Structure Tutorial - 20180508
The Best Node.js & Microservices Articles we Ever Wrote - blog.risingstack.com - 20180516
Node.js - File System - www.tutorialspoint.com
- Synchronous vs Asynchronous
- Open a File
- Flags
- Get File Information
- Writing a File
- Reading a File
- Closing a File
- Truncate a File
- Delete a File
- Create a Directory
- Read a Directory
- Remove a Directory