Last active
October 27, 2015 23:32
-
-
Save devalexandre/10872be824dba713cd27 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/env node | |
// OpenShift sample Node application | |
var express = require('express'); | |
var fs = require('fs'); | |
var app = express(); | |
var site = require('./routers/site'); | |
// seta onde ficaram as views | |
app.set('views', './views') | |
//seta o tipo de template usado | |
app.set('view engine', 'jade'); | |
app.user('/home',site); | |
var ipaddress = process.env.OPENSHIFT_NODEJS_IP || "127.0.0.1" ; | |
var port = process.env.OPENSHIFT_NODEJS_PORT || 8080; | |
app.listen(port, ipaddress, function() { | |
console.log('%s: Node server started on %s:%d ...', | |
Date(Date.now() ),ipaddress,port); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment