index.js 295 Bytes
Newer Older
Pithon Kabiro's avatar
Pithon Kabiro committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const express = require("express");

const app = express();
const port = process.env.PORT || 3000;

app.use(express.static("public"));

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

app.listen(port, () => {
  console.log(`App listening at localhost:${port}`);
});