- Initialized ExpressJS project as per this gist
project-root
├── node_modules
├── package-lock.json
├── package.json
└── server.js
-
In your favourite editor (VSCode), open the file
server.js
-
At the bottom of the file, add endpoint (an API!) handler for
GET /
requests (i.e. the "home" of our ExpressJS server):app.get('/', (request, response) => { response.send('Hello World!') })
-
Open a browser and go to the address: http://localhost:4000/
- you should see 'Hello World!' displayed