Skip to content

Instantly share code, notes, and snippets.

@tonyfreelance
tonyfreelance / api.js
Created February 27, 2017 15:16 — forked from fwielstra/api.js
An example NodeJS / Mongoose / Express application based on their respective tutorials
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');