// Import express var express = require('express'); // Initialize our web app var app = express(); // Set the location of our static files (html and css) app.use(express.static(__dirname + '/theHTML')); // Handle the request when root path (localhost:8080/) app.get('/', function (req, res) { res.send('Hello world'); }); // Handle the request when about path (localhost:8080/about) app.get('/about', function (req, res) { res.send('This is the about page'); }); // Set app to listen on port 8080 app.listen(8080);