├── .gitignore ├── package.json └── server.js /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules 3 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "azi", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "express": "^4.16.2" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const app = express() 3 | 4 | app.get('/', (req, res) => { 5 | return res.send('Home Page') 6 | }); 7 | 8 | app.get('/about', (req,res) => { 9 | res.send('This is the about page'); 10 | }); 11 | 12 | app.get('/contact', (req,res) => { 13 | res.send('This is the contact page'); 14 | }); 15 | 16 | 17 | app.get('/checkout', (req,res) => { 18 | res.send('This is the checkout page'); 19 | }); 20 | 21 | app.get('/product', (req, res) => { 22 | return res.send('And a wonderful product it is!') 23 | }) 24 | 25 | 26 | app.listen(3000, () => { 27 | console.log('listening very attentively on port 3000'); 28 | }) --------------------------------------------------------------------------------