Skip to content

Instantly share code, notes, and snippets.

@sunkay
Created May 9, 2013 02:06
Show Gist options
  • Save sunkay/5545059 to your computer and use it in GitHub Desktop.
Save sunkay/5545059 to your computer and use it in GitHub Desktop.
var express = require('express'),
items = require('./routes/devices.js');
var app = express();
// Read
app.get('/devices', items.findAll);
// View one device
app.get('/device/:id', items.findById);
app.listen(3000);
console.log('Listening on port 3000...');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment