17 lines
421 B
JavaScript
17 lines
421 B
JavaScript
// server.js
|
|
|
|
var sslRedirect = require('heroku-ssl-redirect');
|
|
var express = require('express');
|
|
var path = require('path');
|
|
var serveStatic = require('serve-static');
|
|
|
|
app = express();
|
|
app.use(serveStatic(__dirname + "/dist"));
|
|
|
|
// enable ssl redirect
|
|
app.use(sslRedirect(['other','development', 'staging', 'production']));
|
|
|
|
var port = process.env.PORT || 8080;
|
|
app.listen(port);
|
|
|
|
console.log('server started '+ port);
|