Skip to content

Instantly share code, notes, and snippets.

@juanpabloaj
Created January 10, 2015 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanpabloaj/d93e377102078ecf5b5f to your computer and use it in GitHub Desktop.
Save juanpabloaj/d93e377102078ecf5b5f to your computer and use it in GitHub Desktop.
{
"name": "simple-nodejs-express",
"version": "0.1.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "mocha"
},
"author": "juanpabloaj",
"license": "MIT",
"dependencies": {
"express": "^4.10.7"
}
}
var express = require('express');
var app = express();
var site = express.Router();
var port = process.env.PORT || 8080;
site.use(function(req, res, next){
next();
});
site.route('/')
.get(function(req, res){
res.send('hola js meetup!');
});
app.use('/', site);
app.listen(port);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment