===== meet-the-flintstones Example ======== // Source code file: main.js const express = require("express"); const path =require("path"); const app = express( ); app.use(express.static("public")); app.get("/fred", (q, r) => { r.sendFile(path.join( __dirname + "/views/fred.html")); }); app.get("/wilma", (q, r) => { r.sendFile(path.join( __dirname + "/views/wilma.html")); }); app.listen(3000, ( ) => { console.log("Server started; listening on port 3000"); }); ------------------------------------------- Meet Fred Flintstone

Meet Fred Flintstone



Meet Wilma Flintstone ------------------------------------------- Meet Wilma Flintstone

Meet Wilma Flintstone



Meet Fred Flintstone ------------------------------------------- /* Source code file: public/css/styles.css */ body { background-color: #E0E0FF; color: #000000; font: 100% verdana, sans-serif; } h1 { color: #000080; } img { width: 150px; height: 200px; } ------------------------------------------- // Image file: public/images/fred.jpg ------------------------------------------- // Image file: public/images/wilma.jpg ===========================================