Skip to content

Instantly share code, notes, and snippets.

@DaftMonk
DaftMonk / gist:8265815
Last active January 2, 2016 06:49
Example for sharing server models with the client
// On the server we setup routes to interface with a car controller
app.post('/api/cars/', car.create);
app.put('/api/cars/:id', car.update);
app.get('/api/cars/:id', car.show);
//-----------------------------------
// To interface with this from the client we'll use angular $resource