Created
April 19, 2015 22:46
-
-
Save rubinovitz/a4f724281e64359b22c5 to your computer and use it in GitHub Desktop.
app.js for node.js elasticbeanstalk
This file contains hidden or 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
var express = require('express'); | |
var morgan = require('morgan'); | |
var compression = require('compression') | |
var app = express(); | |
app.use(compression()); | |
app.use(morgan('dev')); | |
// this is in milliseconds, because javascript -_- | |
var oneDay = 86400000; | |
app.use(express.static("" + __dirname + "/dist", { maxAge: oneDay })); | |
app.listen(process.env.PORT || 3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment