Commit b81d2e74 by Johannes Zellner

No need to serve up welcome.html with ejs

1 parent a13b23d7
Showing with 1 additions and 4 deletions
......@@ -7,8 +7,6 @@ var express = require('express'),
morgan = require('morgan'),
passport = require('passport'),
path = require('path'),
ejs = require('ejs'),
fs = require('fs'),
compression = require('compression'),
session = require('express-session'),
bodyParser = require('body-parser'),
......@@ -30,8 +28,7 @@ router.delete('/api/files/*', auth.ldap, files.del);
router.get ('/api/healthcheck', function (req, res) { res.status(200).send(); });
// welcome screen in case / does not serve up any file yet
var appUrl = process.env.APP_ORIGIN ? process.env.APP_ORIGIN : 'http://localhost:3000';
router.get('/', function (req, res) { res.status(200).send(ejs.render(fs.readFileSync(path.join(__dirname, '/app/welcome.html'), 'utf8'), { appUrl: appUrl })); });
router.get('/', function (req, res) { res.status(200).sendFile(path.join(__dirname, '/app/welcome.html')); });
app.use(morgan('dev'));
app.use(compression());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!