Prerequisite – Node.js
What is Express?
Express is a small framework that sits on top of Node.js’s web server functionality to simplify its APIs and add helpful new features.It makes it easier to organize your application’s functionality with middle ware and routing; it adds helpful utilities to Node.js’s HTTP objects;it facilitates the rendering of dynamic HTTP objects.
Installing Express on Windows (WINDOWS 10)
Assuming that you have installed node.js on your system, the following steps should be followed to install express on your Windows:
STEP-1: Creating a directory for our project and make that our working directory.
$ mkdir gfg $ cd gfg
STEP-2: Using npm init command to create a package.json file for our project.
$ npm init
This command describes all the dependencies of our project. The file will be updated when adding further dependencies during the development process, for example when you set up your build system.
Keep pressing enter and enter “yes/no” accordingly at the terminus line.
STEP-3: Installing Express
Now in your gfg(name of your folder) folder type the following command line:
$ npm install express --save
NOTE- Here “WARN” indicates the fields that must be entered in STEP-2.
STEP-4: Verify that Express.js was installed on your Windows:
To check that express.js was installed on your system or not, you can run the following command line on cmd:
C:\Users\Admin\gfg\node_modules>npm --version express
The version of express.js will be displayed on successful installation.
- Express.js express.json() Function
- Express.js express.text() Function
- Express.js express.urlencoded() Function
- Express.js express.raw() Function
- Express.js express.Router() Function
- Express.js express.static() Function
- Express Cookie-Parser - Signed and Unsigned Cookies
- Express.js | app.disable() Function
- NodeJS | Building simple REST API in express
- Design first Application using Express
- Session Management using express-session Module in Node.js
- How to Validate Data using express-validator Module in Node.js ?
- Why Express ‘app’ and ‘server’ files kept separately ?
- What is PCIe(Peripheral Component Interconnect express)?
- Error Handling in Express
- Creating Socket.IO Server using Express Generator
- Express.js | app.path() Function
- Express.js | app.set() Function
- Express.js | app.route() Function
- Express.js | app.post() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.