Index

joshstock.in / e654c77

Source for serving and static templating/compiling of https://joshstock.in.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
4804 Jan 2020 12:536799f82Create git pager sourceJosh Stockin1180N

Blob @ joshstock.in / gitpager / index.js

application/javascript484 bytesdownload raw
1const fs = require("fs");
2const path = require("path");
3const express = require("express");
4const app = express();
5const port = 8080;
6
7let indexHTML = fs.readFileSync(path.resolve(__dirname, "index.html"), "utf8");
8let styleCSS = fs.readFileSync(path.resolve(__dirname, "style.css"), "utf8");
9app.get("/", function (req, res) {
10 res.type("html");
11 res.send(indexHTML);
12});
13app.get("/style.css", function (req, res) {
14 res.type("text/css");
15 res.send(styleCSS);
16});
17
18app.listen(port);
19