23 lines
504 B
JavaScript
23 lines
504 B
JavaScript
|
const express = require("express"),
|
||
|
paths = require("./fileManager.js"),
|
||
|
pageUpdater = require("./pageUpdater.js"),
|
||
|
path = require("path"),
|
||
|
fs = require("fs")
|
||
|
|
||
|
const PORT = process.env.PORT || 8080
|
||
|
|
||
|
var app = express()
|
||
|
|
||
|
app.use(express.static(paths.static))
|
||
|
|
||
|
app.get("/", (req, res) => {
|
||
|
res.send(pageUpdater.root())
|
||
|
})
|
||
|
|
||
|
app.get('/post/:post*', (req, res) => {
|
||
|
res.send(pageUpdater.blogPost(req))
|
||
|
})
|
||
|
|
||
|
app.listen(PORT, () => {
|
||
|
console.log("Violet's Limbo is now listening on port: " + PORT)
|
||
|
})
|