How to create your first web application with Node.js and Express

Gabriele de Capoa
1 min readMay 1, 2021

--

Photo by Radowan Nakif Rehan on Unsplash

As we see in this article, Node.js is a language very powerful, but it has not an application server embedded.
To expose your application on the Internet, you need an application server, and the most used, well documented and simple is Express.

Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
This framework provides a thin layer of fundamental web application features, without obscuring Node.js.

To use Express you just

  • insert "express" : "<version>" into dependencies section of package.json file and then execute npm install, or
  • run npm install express -save command.

After that you could start to write your code and you have a simple Node.js application that uses Express.

This is the same identical application we saw in the previous article, but it is more concise. Express, in fact, create itself an HTTP server, so it is no more necessary to use http module.

Originally published at https://gabriele-decapoa.github.io.

--

--

Gabriele de Capoa
Gabriele de Capoa

Written by Gabriele de Capoa

Cloud software engineer, wanna-be data scientist, former Scrum Master. Agile, DevOps, Kubernetes and SQL are my top topics.

No responses yet