small cosmetics in server.js
This commit is contained in:
parent
baa580ac87
commit
f3ce7957f3
1 changed files with 5 additions and 8 deletions
13
server.js
13
server.js
|
@ -8,17 +8,14 @@ const config = require('config');
|
|||
const logger = require('winston');
|
||||
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
|
||||
const logLevel = config.get('Logging.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)
|
||||
app.use(express.static(`${__dirname}/public`));
|
||||
|
||||
|
@ -32,7 +29,7 @@ app.use((req, res, next) => { // logging middleware
|
|||
next();
|
||||
});
|
||||
|
||||
// configure handlebars & register it with Express app
|
||||
// configure handlebars & register it with express app
|
||||
const hbs = expressHandlebars.create({
|
||||
defaultLayout: 'main', // sets the default layout
|
||||
handlebars : Handlebars, // includes basic handlebars for access to that library
|
||||
|
|
Loading…
Reference in a new issue