Skip to content

Commit

Permalink
Merge pull request #34 from briandeanda/setup
Browse files Browse the repository at this point in the history
Remove dep
  • Loading branch information
briandeanda committed Aug 3, 2015
2 parents 7259ae0 + 00b7a52 commit f54df42
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
2 changes: 0 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
var express = require('express');
var app = express();
var mongoose = require('mongoose');
var autoIncrement = require('mongoose-auto-increment');
var hogan = require('hogan-express');
var username = process.env.USER;
var password = process.env.PASSWORD;
var mongoURL = "mongodb://" + username + ":" + password + "@ds047632.mongolab.com:47632/csin3students";
var path = require('path');
var connection = mongoose.connect(mongoURL);
autoIncrement.initialize(connection);
var router = express.Router();
require('./models/Students');
require('./models/Event');
Expand Down
2 changes: 0 additions & 2 deletions models/Event.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var mongoose = require('mongoose');
var Schema=mongoose.Schema;
var autoIncrement = require('mongoose-auto-increment');

var eventsSchema = new Schema({
id: Number,
Expand All @@ -17,6 +16,5 @@ var eventsSchema = new Schema({
isFulltime: Boolean
});

eventsSchema.plugin(autoIncrement.plugin, { model: 'Events', startAt: 1 });
var Events = mongoose.model('Events', eventsSchema);
module.exports = Events;
2 changes: 0 additions & 2 deletions models/Students.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var mongoose = require('mongoose');
var Schema=mongoose.Schema;
var autoIncrement = require('mongoose-auto-increment');

var studentsSchema = new Schema({
id: Number,
Expand All @@ -13,6 +12,5 @@ var studentsSchema = new Schema({
isAlumni: Boolean
});

studentsSchema.plugin(autoIncrement.plugin, { model: 'Students', startAt: 1 });
var Students = mongoose.model('Students', studentsSchema);
module.exports = Students;
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"debug": "^2.2.0",
"express": "^4.13.2",
"hogan-express": "^0.5.2",
"mongoose": "^4.0.0",
"mongoose-auto-increment": "^4.0.0"
"mongoose": "^4.0.0"
},
"engine": "node 0.10.32"
"engines": { "node": "0.10.32"}
}

0 comments on commit f54df42

Please sign in to comment.