-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
15 lines (11 loc) · 729 Bytes
/
Copy pathserver.js
File metadata and controls
15 lines (11 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// set up ======================================================================
var express = require('express');
var app = express(); // create our app w/ express // mongoose for mongodb
var port = process.env.PORT || 8080; // set the port
// configuration ===============================================================
app.use(express.static(__dirname + '/public')); // set the static files location /public/img will be /img for users
// routes ======================================================================
require('./app/routes.js')(app);
// listen (start app with node server.js) ======================================
app.listen(port);
console.log("App listening on port " + port);