treesummaryrefslogcommitdiff
path: root/index.js
blob: 250ab98415bfa139796065f9ff44a426c8b67fcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const express = require("express")
const fs = require("fs")
const app = express()
const port = 3000

app.get("/", (req, res) => {
  fs.readFile("index.html", (err, data) => {
    res.sendFile(__dirname + "/html/index.html");
  });
});

app.get("/script.js", (req, res) => res.sendFile(__dirname + "/html/script.js"))

app.listen(port, () => {
  console.log("Listening on port %d", port)
});