Created
August 25, 2018 12:56
-
-
Save awareness481/bbdba6a307d2c85315a59fea54902ad8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const http = require('http'); | |
const path = require('path'); | |
const routes = require('./routes'); | |
const app = express(); | |
const server = http.createServer(app); | |
// view engine | |
app.set('views', path.join(__dirname, './views')); | |
app.set('view engine', 'pug'); | |
app.use('/', routes); | |
app.use(express.static(path.join(__dirname, './public'))); | |
server.listen(3000); | |
server.on('listening', () => { | |
console.log('Server initialized at 3000'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment