How to Install Express in Ubuntu Linux operating system

Posted on

The purpose for installing express is solely to develop a web-based application to be executed in Node.js. Based on the information given in Wikipedia page exists in the following link , express is defined as : Express.js, or simply Express, is a web application framework for Node.js, released as free and open-source software under the MIT License. It is designed for building web applications and APIs. It has been called the de facto standard server framework for Node.js.

So, based on the information given in the Wikipedia page, to be able to run a Node.js web-based application, express is used as a framework which can be a great help to built it. Below is the command execution which is executed to create a web-based application project using express as its framework :

express directory_name
user@hostname:~/nodejs$ express crud
The program 'express' is currently not installed. You can install it by typing:
sudo apt install node-express-generator

Switch as root account :

user@hostname:~/nodejs$ sudo su - 
[sudo] password for user : 
root@hostname:~# apt-get -y install node-express-generator
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  comerr-dev krb5-multidev libgssrpc4 libkadm5clnt-mit9 libkadm5srv-mit9 libkdb5-8 libssl-dev libssl-doc
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  node-accepts node-buffer-crc32 node-commander node-cookie node-cookie-signature node-crc node-debug node-depd node-escape-html node-etag node-express node-fresh
  node-media-typer node-merge-descriptors node-methods node-mime node-mime-types node-mkdirp node-negotiator node-on-finished node-parseurl node-path-to-regexp node-qs
  node-range-parser node-send node-serve-static node-type-is node-utils-merge
The following NEW packages will be installed:
  node-accepts node-buffer-crc32 node-commander node-cookie node-cookie-signature node-crc node-debug node-depd node-escape-html node-etag node-express node-express-generator
  node-fresh node-media-typer node-merge-descriptors node-methods node-mime node-mime-types node-mkdirp node-negotiator node-on-finished node-parseurl node-path-to-regexp
  node-qs node-range-parser node-send node-serve-static node-type-is node-utils-merge
0 upgraded, 29 newly installed, 0 to remove and 28 not upgraded.
Need to get 227 kB of archives.
After this operation, 1.999 kB of additional disk space will be used.
...
Fetched 227 kB in 3s (59,9 kB/s)                   
Selecting previously unselected package node-negotiator.
(Reading database ... 404572 files and directories currently installed.)
Preparing to unpack .../node-negotiator_0.4.8-1_all.deb ...
Unpacking node-negotiator (0.4.8-1) ...
Selecting previously unselected package node-mime-types.
Preparing to unpack .../node-mime-types_2.0.2-2_all.deb ...
Unpacking node-mime-types (2.0.2-2) ...
Selecting previously unselected package node-accepts.
Preparing to unpack .../node-accepts_1.1.1-1_all.deb ...
Unpacking node-accepts (1.1.1-1) ...
Selecting previously unselected package node-buffer-crc32.
Preparing to unpack .../node-buffer-crc32_0.2.1-1_all.deb ...
Unpacking node-buffer-crc32 (0.2.1-1) ...
Selecting previously unselected package node-commander.
Preparing to unpack .../node-commander_2.4.0-1_all.deb ...
Unpacking node-commander (2.4.0-1) ...
Selecting previously unselected package node-cookie.
Preparing to unpack .../node-cookie_0.1.2-2_all.deb ...
Unpacking node-cookie (0.1.2-2) ...
Selecting previously unselected package node-cookie-signature.
Preparing to unpack .../node-cookie-signature_1.0.3-1_all.deb ...
Unpacking node-cookie-signature (1.0.3-1) ...
Selecting previously unselected package node-crc.
Preparing to unpack .../node-crc_3.0.0-3_all.deb ...
Unpacking node-crc (3.0.0-3) ...
Selecting previously unselected package node-debug.
Preparing to unpack .../node-debug_2.1.0+dfsg-2_all.deb ...
Unpacking node-debug (2.1.0+dfsg-2) ...
Selecting previously unselected package node-depd.
Preparing to unpack .../node-depd_1.0.0-1_all.deb ...
Unpacking node-depd (1.0.0-1) ...
Selecting previously unselected package node-escape-html.
Preparing to unpack .../node-escape-html_1.0.1-1_all.deb ...
Unpacking node-escape-html (1.0.1-1) ...
Selecting previously unselected package node-etag.
Preparing to unpack .../node-etag_1.4.0-1_all.deb ...
Unpacking node-etag (1.4.0-1) ...
Selecting previously unselected package node-parseurl.
Preparing to unpack .../node-parseurl_1.3.0-1_all.deb ...
Unpacking node-parseurl (1.3.0-1) ...
Selecting previously unselected package node-qs.
Preparing to unpack .../node-qs_2.2.4-1_all.deb ...
Unpacking node-qs (2.2.4-1) ...
Selecting previously unselected package node-methods.
Preparing to unpack .../node-methods_1.1.0-1_all.deb ...
Unpacking node-methods (1.1.0-1) ...
Selecting previously unselected package node-media-typer.
Preparing to unpack .../node-media-typer_0.3.0-1_all.deb ...
Unpacking node-media-typer (0.3.0-1) ...
Selecting previously unselected package node-type-is.
Preparing to unpack .../node-type-is_1.5.2-1_all.deb ...
Unpacking node-type-is (1.5.2-1) ...
Selecting previously unselected package node-fresh.
Preparing to unpack .../node-fresh_0.2.0-1_all.deb ...
Unpacking node-fresh (0.2.0-1) ...
Selecting previously unselected package node-mime.
Preparing to unpack .../node-mime_1.3.4-1_all.deb ...
Unpacking node-mime (1.3.4-1) ...
Selecting previously unselected package node-on-finished.
Preparing to unpack .../node-on-finished_2.1.0-2_all.deb ...
Unpacking node-on-finished (2.1.0-2) ...
Selecting previously unselected package node-range-parser.
Preparing to unpack .../node-range-parser_0.0.4+git7d1cd72a-1_all.deb ...
Unpacking node-range-parser (0.0.4+git7d1cd72a-1) ...
Selecting previously unselected package node-send.
Preparing to unpack .../node-send_0.9.4-1_all.deb ...
Unpacking node-send (0.9.4-1) ...
Selecting previously unselected package node-merge-descriptors.
Preparing to unpack .../node-merge-descriptors_0.0.2-1_all.deb ...
Unpacking node-merge-descriptors (0.0.2-1) ...
Selecting previously unselected package node-path-to-regexp.
Preparing to unpack .../node-path-to-regexp_1.0.1-1_all.deb ...
Unpacking node-path-to-regexp (1.0.1-1) ...
Selecting previously unselected package node-utils-merge.
Preparing to unpack .../node-utils-merge_1.0.0-1_all.deb ...
Unpacking node-utils-merge (1.0.0-1) ...
Selecting previously unselected package node-serve-static.
Preparing to unpack .../node-serve-static_1.6.4-2_all.deb ...
Unpacking node-serve-static (1.6.4-2) ...
Selecting previously unselected package node-express.
Preparing to unpack .../node-express_4.1.1~dfsg-1_all.deb ...
Unpacking node-express (4.1.1~dfsg-1) ...
Selecting previously unselected package node-mkdirp.
Preparing to unpack .../node-mkdirp_0.5.0-1_all.deb ...
Unpacking node-mkdirp (0.5.0-1) ...
Selecting previously unselected package node-express-generator.
Preparing to unpack .../node-express-generator_4.0.0-2_all.deb ...
Unpacking node-express-generator (4.0.0-2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up node-negotiator (0.4.8-1) ...
Setting up node-mime-types (2.0.2-2) ...
Setting up node-accepts (1.1.1-1) ...
Setting up node-buffer-crc32 (0.2.1-1) ...
Setting up node-commander (2.4.0-1) ...
Setting up node-cookie (0.1.2-2) ...
Setting up node-cookie-signature (1.0.3-1) ...
Setting up node-crc (3.0.0-3) ...
Setting up node-debug (2.1.0+dfsg-2) ...
Setting up node-depd (1.0.0-1) ...
Setting up node-escape-html (1.0.1-1) ...
Setting up node-etag (1.4.0-1) ...
Setting up node-parseurl (1.3.0-1) ...
Setting up node-qs (2.2.4-1) ...
Setting up node-methods (1.1.0-1) ...
Setting up node-media-typer (0.3.0-1) ...
Setting up node-type-is (1.5.2-1) ...
Setting up node-fresh (0.2.0-1) ...
Setting up node-mime (1.3.4-1) ...
Setting up node-on-finished (2.1.0-2) ...
Setting up node-range-parser (0.0.4+git7d1cd72a-1) ...
Setting up node-send (0.9.4-1) ...
Setting up node-merge-descriptors (0.0.2-1) ...
Setting up node-path-to-regexp (1.0.1-1) ...
Setting up node-utils-merge (1.0.0-1) ...
Setting up node-serve-static (1.6.4-2) ...
Setting up node-express (4.1.1~dfsg-1) ...
Setting up node-mkdirp (0.5.0-1) ...
Setting up node-express-generator (4.0.0-2) ...
root@hostname:~# 

The following is the help output of express which is retrieved by typing ‘express -h’ :

user@hostname:/usr/bin$ express -h

  Usage: express [options] [dir]

  Options:

    -h, --help          output usage information
    -V, --version       output the version number
    -e, --ejs           add ejs engine support (defaults to jade)
    -H, --hogan         add hogan.js engine support
    -c, --css   add stylesheet  support (less|stylus|compass) (defaults to plain css)
    -f, --force         force on non-empty directory

user@hostname:/usr/bin$

The above command execution is clearly answered what is express can do. Based on the manual page of express where it can be retrieved by typing ‘man express’, it is giving a short explanation which express is the quickest way to start using express framework. So, to be able to create a framework for web-based application on Node.js platform, use ‘express’

2 thoughts on “How to Install Express in Ubuntu Linux operating system

Leave a Reply