Chapter 6: updates

This commit is contained in:
Beth Griggs
2020-05-22 11:49:31 +01:00
parent 45e2b0cb96
commit 4f825bdac3
25 changed files with 9 additions and 762 deletions
+9 -9
View File
@@ -1,14 +1,14 @@
const express = require('express')
const path = require('path')
const index = require('./routes/index')
const express = require("express");
const path = require("path");
const index = require("./routes/index");
const PORT = process.env.PORT || 3000
const PORT = process.env.PORT || 3000;
const app = express()
const app = express();
app.use(express.static(path.join(__dirname, 'public')))
app.use('/', index)
app.use(express.static(path.join(__dirname, "public")));
app.use("/", index);
app.listen(PORT, () => {
console.log(`Server listening on port ${PORT}`)
})
console.log(`Server listening on port ${PORT}`);
});