Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var express = require('express');
- var config = require('./modules/config');
- var routes = require('./modules/routes'); // Using all routes as an exported function. See routes.js.
- var db = require('./modules/db.js');
- var app = express();
- app.set('view engine', 'pug');
- app.use('/form', express.static(`${__dirname}/static`));
- app.use('/form/form', express.static(`${__dirname}/static`));
- // app.use('/static', express.static(`${__dirname}/static`));
- app.use('/uploads', express.static(`${__dirname}/uploads`));
- routes(app, config, db); // Running routes module with the app, config and database objects. Webroutes are found in routes.js.
- db.sql.sync().then(function(){
- app.listen(config.port, function(){
- console.log(`Express running on ${config.port}`);
- });
- });
Add Comment
Please, Sign In to add comment