How to install express on Ubuntu 12.04

Express is a node.js web application framework. Before installing express we need to install node.js and npm (Node Packaged Modules). I recommend you to update your system with this PPA (Personal Package Archives) so you can install an up-to-date version of node.js:

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:chris-lea/node.js
$ sudo apt-get update
$ sudo apt-get install nodejs npm
$ node -v

Express is a node.js module, so we can:

$ npm install express

To check that express is already installed:

$ npm ls
└─┬ express@3.0.3
  ├── commander@0.6.1
  ├─┬ connect@2.7.0
  │ ├── bytes@0.1.0
  │ ├── formidable@1.0.11
  │ ├── pause@0.0.1
  │ └── qs@0.5.1
  ├── cookie@0.0.5
  ├── cookie-signature@0.0.1
  ├── crc@0.2.0
  ├── debug@0.7.0
  ├── fresh@0.1.0
  ├── methods@0.0.1
  ├── mkdirp@0.3.3
  ├── range-parser@0.0.4
  └─┬ send@0.1.0
    └── mime@1.2.6

Easy, isn’t it?

This entry was posted in javascript. Bookmark the permalink.

2 Responses to How to install express on Ubuntu 12.04

  1. splixs says:

    i tried it today, and found out that you wont need to install npm manually anymore, since its probably implemented in the nodejs (v0.10) installation. (correct me if i’m wrong)

    great tutorial, helped me a lot