Skip to content

Commit

Permalink
index
Browse files Browse the repository at this point in the history
  • Loading branch information
nalbam committed Aug 30, 2019
1 parent 3f918ec commit f1ac25d
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const os = require('os'),
express = require('express');

const gpio = require('rpi-gpio');
const express = require('express'),
gpio = require('rpi-gpio');

const app = express();
const http = require('http').Server(app);
Expand All @@ -16,32 +14,22 @@ app.set('view engine', 'ejs');
app.use(express.static('static'));

app.get('/', function (req, res) {
let host = os.hostname();
res.render('index.ejs', {
host: host,
port: port
});
res.render('index.ejs', {});
});

app.get('/timer', function (req, res) {
let host = os.hostname();
res.render('timer.ejs', {
host: host,
port: port
});
res.render('timer.ejs', {});
});

app.get('/league/:league', function (req, res) {
const league = req.params.league;
let host = os.hostname();
res.render('league.ejs', {
league: league
});
});

app.get('/leaderboard/:league', function (req, res) {
const league = req.params.league;
let host = os.hostname();
res.render('leaderboard.ejs', {
league: league
});
Expand Down

0 comments on commit f1ac25d

Please sign in to comment.