-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
17 lines (14 loc) · 701 Bytes
/
Copy pathapp.js
File metadata and controls
17 lines (14 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// set up server
var config = require('./config/config.js'), // import config variables
port = config.port, // set the port
express = require('express'), // use express as the framwork
app = express(), // create the server using express
path = require('path'); // utility module
app.use(express.static(path.join(__dirname, 'public'))); // this middleware serves static files, such as .js, .img, .css files
// Initialize server
var server = app.listen(port, function () {
console.log('Listening on port %d', server.address().port);
});
// app.get('/', function (req, res) {
// res.render('index.html');
// });