O'Reilly logo

Hands-On Full Stack Web Development with Aurelia by Erikson Haziz Murrugarra Sifuentes, Diego Jose Arguelles Rojas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coding our server

It's time to create our FIFA backend folder and start working on the API development. Open your Terminal and run the following command:

$ mkdir wc-backend$ cd wc-backend$ npm init -y{  "name": "wc-backend",  "version": "1.0.0",  "description": "",  "main": "index.js",  "scripts": {    "test": "echo \"Error: no test specified\" && exit 1"  },  "keywords": [],  "author": "",  "license": "ISC"}

Once the initialization is done, let's install Express.js. Execute the following command:

$ npm install --save express

Next, create the server.js file in the root folder and write the following code:

const express = require('express')const app = express()app.use((req, res) => {    res.send("Hello!")})app.listen(3000, () => { console.log('running on ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required