-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
111 lines (96 loc) · 2.07 KB
/
app.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
var express = require('express'),
http = require('http'),
path = require('path'),
exphbs = require('express3-handlebars'),
app = express();
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '/views');
app.engine('hbs', exphbs({
defaultLayout: 'main'
}));
app.set('view engine', 'hbs');
app.use(express.static(process.cwd() + '/public'));
/* temporary place for data */
var jams = [];
jams.push({
name: "#6HourGameJam 0",
date: "10-01-14",
theme: "Alchemy",
jamId: 0
});
var games = [];
games.push({
name: "untitled",
image1: "http://placehold.it/640x480",
image2: "",
image3: "",
image4: "",
image5: "",
creator: "Alex Bezuska",
studio: "TwoScoopGames",
website: "http://twoscoopgames.com",
twitter: "alexbezuska",
jamId: 0,
gameId: 0,
gameLink: "https://rawgit.com/AlexBezuska/6HourGameJam---Alchemy/master/index.html",
web: true,
mac: false,
linux: false,
win: false,
iOS: false,
android: false,
tabletop: false,
other: false,
otherName: "",
active: true
});
games.push({
name: "Alchemy Shooter",
image1: "http://placehold.it/640x480",
image2: "",
image3: "",
image4: "",
image5: "",
creator: "Rex Soriano",
studio: "",
website: "http://awesomerex.com",
twitter: "LoLo_R",
jamId: 0,
gameId: 1,
gameLink: "https://rawgit.com/awesomerex/alchemy-shooter/master/index.html",
web: true,
mac: false,
linux: false,
win: false,
iOS: false,
android: false,
tabletop: false,
other: false,
otherName: "",
active: true
});
app.get("/", function(req, res) {
res.render("about", {
layout: "main",
title: "About the Jam",
slogan: "At this time we only accept self-hosted games."
});
});
app.get("/submit", function(req, res) {
res.render("submit", {
layout: "main",
title: "Submit your game",
slogan: "At this time we only accept self-hosted games."
});
});
app.get("/past", function(req, res) {
res.render("past", {
layout: "main",
title: "Past Jams",
slogan: "View all of the games from past #6HourGameJams",
jams: jams,
games: games
});
});
app.listen(3001);
console.log("Express server listening on port 3001");