small cosmetics in server.js

This commit is contained in:
bill bittner 2017-07-18 09:59:40 -07:00
parent baa580ac87
commit f3ce7957f3

View file

@ -8,17 +8,14 @@ const config = require('config');
const logger = require('winston'); const logger = require('winston');
const { getDownloadDirectory } = require('./helpers/libraries/lbryApi'); const { getDownloadDirectory } = require('./helpers/libraries/lbryApi');
const PORT = 3000; // set port
const app = express(); // create an Express application
const db = require('./models'); // require our models for syncing
// configure logging // configure logging
const logLevel = config.get('Logging.LogLevel'); const logLevel = config.get('Logging.LogLevel');
require('./config/loggerSetup.js')(logger, logLevel); require('./config/loggerSetup.js')(logger, logLevel);
// set port
const PORT = 3000;
// create an Express application
const app = express();
// require our models for syncing
const db = require('./models');
// serve static files from public directory (css/js/img) // serve static files from public directory (css/js/img)
app.use(express.static(`${__dirname}/public`)); app.use(express.static(`${__dirname}/public`));
@ -32,7 +29,7 @@ app.use((req, res, next) => { // logging middleware
next(); next();
}); });
// configure handlebars & register it with Express app // configure handlebars & register it with express app
const hbs = expressHandlebars.create({ const hbs = expressHandlebars.create({
defaultLayout: 'main', // sets the default layout defaultLayout: 'main', // sets the default layout
handlebars : Handlebars, // includes basic handlebars for access to that library handlebars : Handlebars, // includes basic handlebars for access to that library