Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

The great thing about setting a NodeJS project means you can write Javascript code independent of ReactJS or Angular. This means debugging classes etc is so easy.

Setting up nodejs express

Code Block
npm install -g express-generator

Creating a nodejs project

Code Block
express <project location> --view pug

Set <project location> to “.” if you want to create a project in the current directory otherwise specify the path to the project.

Code Block
npm install

Node will download the default project dependencies

You may get some dependency warnings for the following packages - canvas, bufferutil, and utf-8-validate. If so use the following commands to install the updates

Code Block
npm install --global canvas
npm install --global bufferutil
npm install --global utf-8-validate