Skip to content

Instantly share code, notes, and snippets.

View xiaohan2012's full-sized avatar
🍠
eating sweat potatos

Xiao Han xiaohan2012

🍠
eating sweat potatos
View GitHub Profile
/* 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');