forked from github/game-off-2012
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d418f13
commit f839ae7
Showing
305 changed files
with
5,122 additions
and
17,203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM node:6.6.0 | ||
|
||
# npm-shrinkwrap.json, package.json | ||
COPY *.json /tmp/ | ||
RUN mkdir -p /opt/app && \ | ||
cd /opt/app && \ | ||
cp /tmp/npm-shrinkwrap.json . && \ | ||
cp /tmp/package.json . && \ | ||
npm install --production --unsafe-perm --loglevel warn | ||
|
||
COPY . /opt/app | ||
|
||
WORKDIR /opt/app | ||
|
||
CMD ["npm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,24 @@ | ||
|
||
/** | ||
* Module dependencies. | ||
*/ | ||
|
||
var express = require('express') | ||
, http = require('http') | ||
, path = require('path'); | ||
|
||
var app = express(); | ||
var port = process.env.PORT || 3000; | ||
|
||
app.configure(function(){ | ||
app.set('port', process.env.PORT || 3005); | ||
app.set('views', __dirname + '/views'); | ||
app.set('view engine', 'jade'); | ||
app.use(express.logger('dev')); | ||
app.use(express.bodyParser()); | ||
app.use(express.methodOverride()); | ||
app.use(app.router); | ||
app.use(express.static(path.join(__dirname, 'public'))); | ||
app.all('/', function(req, res){ | ||
res.sendFile(path.join(__dirname, 'views/index.html')); | ||
}); | ||
|
||
app.configure('development', function(){ | ||
app.use(express.errorHandler()); | ||
}); | ||
app.get('/ping', function (req, res) { | ||
res.send('pong'); | ||
}) | ||
|
||
app.get('/', function(req, res){ | ||
res.sendfile('views/index.html'); | ||
app.get('/manifest.webapp', function(req, res){ | ||
res.header('Content-Type', 'application/x-web-app-manifest+json'); | ||
res.sendfile('manifest.webapp'); | ||
}); | ||
|
||
http.createServer(app).listen(app.get('port'), function(){ | ||
console.log("Express server listening on port " + app.get('port')); | ||
app.use(express.static(path.join(__dirname, 'public'))); | ||
|
||
app.listen(port, function(){ | ||
console.log("Express server listening on port " + port); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.