Skip to content

Instantly share code, notes, and snippets.

@devalexandre
Last active October 27, 2015 23:32
Show Gist options
  • Save devalexandre/10872be824dba713cd27 to your computer and use it in GitHub Desktop.
Save devalexandre/10872be824dba713cd27 to your computer and use it in GitHub Desktop.
#!/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