<!-- directions/index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index</title>
</head>
<body>
<h1>Index - Node.js and Express Framework</h1>
</body>
</html>
<!-- directions/test.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test</title>
</head>
<body>
<h1>Test - Node.js and Express Framework</h1>
</body>
</html>
// index.js
const express = require('express');
const path = require('path');
const app = express();
app.use(express.static(path.join(__dirname, 'directions')));
const PORT = process.env.PORT || 8080;
app.listen(PORT, () => console.log(`Server started on port ${PORT}`));
/*
run:
Server started on port 8080
On http://localhost:8080/
Index - Node.js and Express Framework
On http://localhost:8080/test.html
Test - Node.js and Express Framework
*/