forked from saldomx/LostAndFound
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.js
executable file
·36 lines (24 loc) · 996 Bytes
/
common.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Generated by CoffeeScript 1.6.2
// Edited manually afterwards.
(function() {
var Common, instance;
Common = (function() {
function Common() {}
Common.prototype.express = require('express');
Common.prototype.flash = require('connect-flash');
Common.prototype.passport = require('passport');
Common.prototype.mongoose = require('mongoose');
Common.prototype.mongoStore = require('connect-mongo')(Common.prototype.express); // Added manually.
Common.prototype.init = function(mongourl, port, env) {
this.app = this.express.createServer();
this.mongourl = mongourl || process.argv[3] || process.env.NODE_DB || 'mongodb://localhost/laf';
this.port = port || process.env.PORT || 9001;
this.env = env || process.argv[2] || process.env.NODE_ENV || 'development';
this.mongoose.connect(this.mongourl);
return this;
};
return Common;
})();
instance = new Common;
module.exports = instance;
}).call(this);