-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
41 lines (31 loc) · 1.07 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const express = require("express");
const path = require('path');
const tinylr = require('tiny-lr');
const bodyParser = require('body-parser');
const app = express();
app.set('port', (process.env.PORT || 5000));
/** Attempting to set up live reload with tiny-lr
app.use(bodyParser())
.use(tinylr.middleware({ app: app }))
.use(express.static(__dirname + "/styles"))
.use(express.static(__dirname + "/scripts"))
.listen(app.get('port'), function() {
console.log('Node app is running on port', app.get('port'));
});
*/
app.use(express.static(__dirname + "/styles"))
.use(express.static(__dirname + "/scripts"))
.listen(app.get('port'), function() {
console.log('Node app is running on port', app.get('port'));
});
app.set("views", __dirname + "/views");
app.set("view engine", "ejs");
app.get("/", function(req, res) {
res.sendFile(__dirname + "/views/intervals.html");
});
app.get("/intervals", function(req, res) {
res.sendFile(__dirname + "/views/intervals.html");
});
app.get("/quiz", function(req, res) {
res.sendFile(__dirname + "/views/quiz.html");
});