issue-tracker/routes/api.js

42 lines
734 B
JavaScript
Raw Normal View History

2017-02-18 20:21:34 +01:00
/*
*
*
* Complete the API routing below
*
*
*/
'use strict';
var expect = require('chai').expect;
var MongoClient = require('mongodb');
var ObjectId = require('mongodb').ObjectID;
const CONNECTION_STRING = process.env.DB; //MongoClient.connect(CONNECTION_STRING, function(err, db) {});
module.exports = function (app) {
app.route('/api/issues/:project')
.get(function (req, res){
var project = req.params.project;
})
.post(function (req, res){
var project = req.params.project;
})
.put(function (req, res){
var project = req.params.project;
})
.delete(function (req, res){
var project = req.params.project;
});
};