mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 13:24:24 +00:00
removed old + some new code
This commit is contained in:
@@ -14,11 +14,11 @@ const expressSession = require( 'express-session' );
|
||||
const bodyParser = require( 'body-parser' );
|
||||
const cookieParser = require( 'cookie-parser' );
|
||||
const http = require( 'http' );
|
||||
const fs = require( 'fs' );
|
||||
|
||||
// const env = process.env.PROD || false;
|
||||
|
||||
// const settings = JSON.parse( fs.readFileSync( path.join( __dirname + '/config.json' ) ) );
|
||||
|
||||
const settings = JSON.parse( fs.readFileSync( path.join( __dirname + '/config.json' ) ) );
|
||||
|
||||
// initialise express with middlewares
|
||||
app.use( expressSession( {
|
||||
@@ -33,7 +33,10 @@ app.use( cookieParser() );
|
||||
// app.use( favicon( path.join( __dirname + '/ui/assets/logo.png' ) ) );
|
||||
app.use( express.static( '../webapp/dist' ) );
|
||||
|
||||
// require( './admin/routes.js' )( app, settings ); // admin route
|
||||
|
||||
require( './admin/routes.js' )( app, settings ); // admin route
|
||||
|
||||
|
||||
app.use( ( request, response ) => {
|
||||
response.sendFile( path.join( __dirname + '/../webapp/dist/index.html' ) );
|
||||
} );
|
||||
|
||||
Reference in New Issue
Block a user