diff options
-rw-r--r-- | docker-compose.yaml | 4 | ||||
-rw-r--r-- | put_in_db.js | 2 | ||||
-rwxr-xr-x | server.js | 15 |
3 files changed, 11 insertions, 10 deletions
diff --git a/docker-compose.yaml b/docker-compose.yaml index 4ca7f8d..bc66662 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -11,8 +11,8 @@ services: ports: - "9000:9000" volumes: - - /etc/letsencrypt/live/blog.terminaldweller.com/fullchain.pem:/etc/letsencrypt/live/blog.terminaldweller.com/fullchain.pem:ro - - /etc/letsencrypt/live/blog.terminaldweller.com/privkey.pem:/etc/letsencrypt/live/blog.terminaldweller.com/privkey.pem:ro + - /etc/letsencrypt/live/blog.terminaldweller.com-0002/fullchain.pem:/etc/letsencrypt/live/blog.terminaldweller.com/fullchain.pem:ro + - /etc/letsencrypt/live/blog.terminaldweller.com-0002/privkey.pem:/etc/letsencrypt/live/blog.terminaldweller.com/privkey.pem:ro cap_drop: - ALL environment: diff --git a/put_in_db.js b/put_in_db.js index 256793f..2a3ed7a 100644 --- a/put_in_db.js +++ b/put_in_db.js @@ -45,7 +45,7 @@ blogs = [ { title: "What to do with your DNS when ODoH's Trust-Me-Bruh Model doesn't work for you", - slug: "What_to_do_with_DNS", + slug: "what_to_do_with_your_dns", body: fs.readFileSync(path.join(__dirname) + "/mds/DNS.md"), teaser: "What to do with your DNS when ODoH's Trust-Me-Bruh Model doesn't work for you", @@ -51,7 +51,7 @@ app.use(helmet.xssFilter()); app.use((req, res, next) => { res.setHeader( "Permissions-Policy", - "geolocation=(self),midi=(self),sync-xhr=(self),microphone=(self),camera=(self),magnetometer=(self),gyroscope=(self),fullscreen=(self),payment=(self),usb=(self)" + "geolocation=(self),midi=(self),sync-xhr=(self),microphone=(self),camera=(self),magnetometer=(self),gyroscope=(self),fullscreen=(self),payment=(self),usb=(self)", ); next(); }); @@ -64,7 +64,7 @@ app.use( scriptSrc: ["none"], styleSrc: ["self", "https:", "unsafef-inline"], }, - }) + }), ); app.use(morgan("combined")); @@ -74,6 +74,7 @@ async function enumerateDir() { } function renderAndSend_v2(req, res, slug) { + console.log(slug); model.blogPost .findOne( { slug: slug }, @@ -83,7 +84,7 @@ function renderAndSend_v2(req, res, slug) { title: 0, teaser: 0, }, - } + }, ) .exec(function (err, blogPost) { if (err) return err; @@ -186,14 +187,14 @@ if (process.env.SERVER_DEPLOYMENT_TYPE == "deployment") { { key: fs.readFileSync( "/etc/letsencrypt/live/blog.terminaldweller.com/privkey.pem", - "utf-8" + "utf-8", ), cert: fs.readFileSync( "/etc/letsencrypt/live/blog.terminaldweller.com/fullchain.pem", - "utf-8" + "utf-8", ), }, - app + app, ) .listen(process.env.SERVER_LISTEN_PORT || 9000); } else if (process.env.SERVER_DEPLOYMENT_TYPE == "test") { @@ -203,7 +204,7 @@ if (process.env.SERVER_DEPLOYMENT_TYPE == "deployment") { key: fs.readFileSync("/certs/server.key", "utf-8"), cert: fs.readFileSync("/certs/server.cert", "utf-8"), }, - app + app, ) .listen(process.env.SERVER_LISTEN_PORT || 9000); } |