diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-10-28 18:06:46 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-10-28 18:06:46 -0400 |
| commit | 9e7bacd46c1e5d0e1c24433690d421ab3f3a11f2 (patch) | |
| tree | 4d0cefa2780dfa4382f1ed2ea481b6aafbdbb15e /server/repl.js | |
| parent | 50da9e3e677f121f15e501bf062da6c45db255ad (diff) | |
| parent | cce1dea756717f1308c6b72f762b5ea5f5b43958 (diff) | |
merge
Diffstat (limited to 'server/repl.js')
| -rw-r--r-- | server/repl.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/server/repl.js b/server/repl.js new file mode 100644 index 0000000..353d8c5 --- /dev/null +++ b/server/repl.js @@ -0,0 +1,19 @@ +var DB_HOST = 'localhost' +var mongoose = require('mongoose') +mongoose.connect('mongodb://' + DB_HOST + '/vvalls', {}, function(){ + console.log("vvalls: connected to", DB_HOST) + var repl = require("repl").start({}); + [ "./lib/schemas/User", + "./lib/schemas/Collaborator", + "./lib/schemas/Documentation", + "./lib/schemas/Layout", + "./lib/schemas/Media", + "./lib/schemas/Project", + "./lib/schemas/Plan", + "./lib/schemas/Subscription", + ].forEach(function(modName){ + // console.log(name, modName) + var namez = modName.split("/"), name = namez[namez.length-1]; + repl.context[name] = require(modName); + }); +}); |
