Created
March 8, 2016 23:46
-
-
Save DeskWOW/88ebfa0d4d6fb4569eda to your computer and use it in GitHub Desktop.
This file contains hidden or 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'), | |
| bodyParser = require('body-parser'), | |
| app = express(), | |
| path = require('path'), | |
| CryptoJS = require("crypto-js"); | |
| app.use(express.static(path.join(__dirname, 'public'))); | |
| app.use(express.static(path.join(__dirname, 'bower_components'))); | |
| app.use(bodyParser.json()); // create application/json parser | |
| app.use(bodyParser.urlencoded({ entended: true })); //create application/x-www-urlencoded parser | |
| var views = path.join(__dirname, 'public/views'); | |
| app.get('/', function (req, res) { | |
| res.sendFile(path.join(views, 'index.html')); | |
| }); | |
| var port = process.env.PORT || 9000; | |
| app.listen(port); | |
| console.log('Listening on port ' + port); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment