vanshajg / vs-node-blog

sample node blog to demonstrate CRUD operations
0 stars 0 forks source link

Setup

-- 2019-07-24 OM

sudo apt-get update sudo apt-get install nodejs sudo apt-get install npm

https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04


ESLINT: $ npm install eslint --save-dev $ ./node_modules/.bin/eslint --init \$ ./node_modules/.bin/eslint yourfile.js u will have a hidden file generated as : .eslintrc.js

https://eslint.org/docs/user-guide/getting-started

--- PRETTIER --- \$ npm install --save-dev --save-exact prettier https://prettier.io/docs/en/install.html

--- WEBPACK --- npm install webpack --save-dev npm install webpack-cli --save-dev

https://webpack.js.org/guides/getting-started/


npm install -g npx

vim webpack.config.js

npx webpack --config webpack.config.js


pm2 documentation install pm2 globally npm install pm2@latest -g

generate ecosystem file pm2 ecosystem


setup webpack for client and server bundles webpack config


implemented JWT with env variables. Env file can be accessed by following steps. import dotenv from 'dotenv' dotenv.config({ silent: true });