Skip to content

Instantly share code, notes, and snippets.

View nasr18's full-sized avatar

Mohamed Nasrullah nasr18

  • ST Global Technologies
  • India
  • X @nasr16
View GitHub Profile
@nasr18
nasr18 / api.js
Created June 20, 2017 05:06 — 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');