Skip to content

Instantly share code, notes, and snippets.

@mojagehub
Last active January 12, 2017 08:40
Show Gist options
  • Save mojagehub/8c6e2f9049e75e689dd8cc1d94c003d7 to your computer and use it in GitHub Desktop.
Save mojagehub/8c6e2f9049e75e689dd8cc1d94c003d7 to your computer and use it in GitHub Desktop.
node.js installation

Node.js

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
$ source ~/.bashrc
$ nvm install stable
$ node -v
$ nvm alias default stable

express

$ npm install -g express
$ npm install -g express-generator
 # @where your app directory
$ vi app.js
  app = require('express')();
  app.get('/', function(req, res){
    res.send('hello world');
  });

  app.listen(3000);
$ express
$ npm install
$ DEBUG=“yourAppDirName”:* ./bin/www
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment