Next Try
This commit is contained in:
parent
bb050a8b1d
commit
f872e7e0fb
1 changed files with 5 additions and 4 deletions
|
@ -2,17 +2,17 @@
|
||||||
var express = require('express');
|
var express = require('express');
|
||||||
var webapp = express();
|
var webapp = express();
|
||||||
var Promise = require('promise');
|
var Promise = require('promise');
|
||||||
//var morgan = require('morgan');
|
var morgan = require('morgan');
|
||||||
|
|
||||||
//OpenShift Settings
|
//OpenShift Settings
|
||||||
var ip = process.env.IP || process.env.OPENSHIFT_NODEJS_IP || '0.0.0.0'
|
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'));
|
webapp.use(morgan('combined'));
|
||||||
|
|
||||||
//External Routing
|
//External Routing
|
||||||
webapp.get('*', function (req, res) {
|
webapp.get('/', function (req, res) {
|
||||||
console.log('works');
|
console.log('works');
|
||||||
res.send('Hello World!');
|
res.send('Hello World!');
|
||||||
});
|
});
|
||||||
|
@ -21,6 +21,7 @@ webapp.get('*', function (req, res) {
|
||||||
|
|
||||||
//Webapp Initialize
|
//Webapp Initialize
|
||||||
webapp.listen(port, ip);
|
webapp.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);
|
||||||
|
|
||||||
module.exports = webapp;
|
module.exports = webapp;
|
Loading…
Add table
Add a link
Reference in a new issue