Grokking Node.js
Vote

0% completed

​

Creating a Basic Express Server

Four statements are enough to start an Express server: load the package, create an app, register a route, and start listening. This lesson builds that server in a new project, runs it, and follows one request through it.

Setting Up the Project

Express is not part of Node.js, so each project installs it from npm. Create a folder, give it a package.json file, and install the package:

mkdir my-express-app cd my-express-app npm init -y npm install express

The command npm init -y writes a package.json with default values. The command `npm install express

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content