- Reference: JavaScript
- https://devcenter.heroku.com/articles/node-best-practices
- https://david-dm.org/zce/itcast-tms?type=dev
- https://github.com/observing/pre-commit
yarn add -g prettyjson
https://npmcompare.com/compare/jsontool,prettyprint
yarn | npm |
---|---|
yarn | npm install |
yarn add package |
npm -i -S package |
- https://yarnpkg.com/
- https://www.sitepoint.com/yarn-vs-npm/
- https://yarnpkg.com/lang/en/docs/migrating-from-npm/
- https://shift.infinite.red/npm-vs-yarn-cheat-sheet-8755b092e5cc
nvm ls nvm use system
node_modules
Environment variables are passed into the scripts
.
This can be tested via:
{
scripts: {
"env": "env | grep NODE"
}
}
Run
yarn run env
NODE_ENV=production yarn run env
DEBUG=express:* yarn start
DEBUG=express-start yarn start
DEBUG=knex:* yarn start
DEBUG=knex:query yarn start
DEBUG=knex:tx yarn start
https://github.com/node-inspector/node-inspector
https://stackoverflow.com/questions/16293923/does-v8-have-unicode-support https://github.com/v8/v8/blob/master/include/v8.h
https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings https://nodejs.org/dist/latest-v4.x/docs/api/buffer.html#buffer_buffers_and_character_encodings
mocha -g 'grep patern for function' file
grunt --tasks .
- Use Yarn
- Install eslint
- Install flow
- Install pre-commit hooks
brew install yarn
yarn add --dev babel-cli babel-preset-flow eslint flow-bin pre-commit
yarn run eslint -- --init
yarn run flow init
- No consistency in one app from another.
- Run latest ES code
- Transpile it to a version browsers can use
- Has to use transpiled server side version
https://github.com/nodejs/Release
version | Support |
---|---|
8.10 | AWS Lamba Support |