-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.js
39 lines (32 loc) · 1.04 KB
/
server.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
var express = require('express');
var exphbs = require('express-handlebars');
var app = express();
const { rapidapi } = require('./config');
console.log(rapidapi);
app.engine('handlebars', exphbs());
app.set('view engine', 'handlebars');
app.use('/css', express.static(__dirname + '/public/css'));
app.use('/js', express.static(__dirname + '/public/js'));
app.use('/images', express.static(__dirname + '/public/images'));
app.get('/', function (req, res) {
res.render('index');
});
app.get('/clicker', function (req, res) {
res.render('clicker');
});
app.get('/hangman', function (req, res) {
res.render('hangman');
});
app.get('/russian_roulette', function (req, res) {
res.render('russian_roulette');
});
app.get('/short_stories', function (req, res) {
res.render('short_stories');
});
app.get('/wordlookup', function (req, res) {
res.render('wordlookup');
});
var server = app.listen(process.env.PORT || 4000, function(){
var port = server.address().port;
console.log("Server started at http://localhost:%s", port);
});