Webapp to app
This commit is contained in:
parent
f837677aaa
commit
68d1ba7591
1 changed files with 6 additions and 6 deletions
12
server.js
12
server.js
|
@ -1,6 +1,6 @@
|
||||||
//Dependencies
|
//Dependencies
|
||||||
var express = require('express');
|
var express = require('express');
|
||||||
var webapp = express();
|
var app = express();
|
||||||
//var Promise = require('promise');
|
//var Promise = require('promise');
|
||||||
//var morgan = require('morgan');
|
//var morgan = require('morgan');
|
||||||
|
|
||||||
|
@ -9,19 +9,19 @@ var ip = process.env.IP || process.env.OPENSHIFT_NODEJS_IP || '0.0.0.0';
|
||||||
var port = process.env.PORT || process.env.OPENSHIFT_NODEJS_PORT || 8080;
|
var port = process.env.PORT || process.env.OPENSHIFT_NODEJS_PORT || 8080;
|
||||||
|
|
||||||
//Reporting
|
//Reporting
|
||||||
//webapp.use(morgan('combined'));
|
//app.use(morgan('combined'));
|
||||||
|
|
||||||
//External Routing
|
//External Routing
|
||||||
webapp.get('/', function (req, res) {
|
app.get('/', function (req, res) {
|
||||||
console.log('works as expected');
|
console.log('works as expected');
|
||||||
res.send('<p>some html</p>');
|
res.send('<p>some html</p>');
|
||||||
//res.send('Hello World Again!');
|
//res.send('Hello World Again!');
|
||||||
});
|
});
|
||||||
|
|
||||||
//webapp.use('/public', express.static(__dirname + '/public'));
|
//app.use('/public', express.static(__dirname + '/public'));
|
||||||
|
|
||||||
//Webapp Initialize
|
//app Initialize
|
||||||
webapp.listen(port, ip);
|
app.listen(port, ip);
|
||||||
//console.log('live on ip: ' + ip + ':' + port);
|
//console.log('live on ip: ' + ip + ':' + port);
|
||||||
console.log('Server running on http://%s:%s', ip, port);
|
console.log('Server running on http://%s:%s', ip, port);
|
||||||
//console.log(JSON.stringify(process.env));
|
//console.log(JSON.stringify(process.env));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue