Created
May 11, 2017 18:30
-
-
Save fredkrudger/942ae4266d45c5f6e76755e71a538dd2 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
var express = require('express'); | |
var cookieParser = require('cookie-parser'); | |
var bodyParser = require('body-parser'); | |
var ejs = require('ejs'); | |
var engine = require('ejs-mate'); | |
var session = require('express-session'); | |
var app = express(); | |
app.use(express.static('public')); | |
app.engine('ejs', engine); | |
app.set('view engine', 'ejs'); | |
app.use(cookieParser()); | |
app.use(bodyParser.urlencoded({extended: true})); | |
app.use(bodyParser.json()); | |
app.get('/', function (req, res, next) { | |
res.render('index'); | |
//next(); | |
}); | |
app.listen(3000, function(){ | |
console.log('server running on port: 3000'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment