@drifted/db 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/index.js +6 -0
- package/initialize.js +11 -0
- package/package.json +23 -0
package/README.md
ADDED
package/index.js
ADDED
package/initialize.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
function initialize(url) {
|
|
5
|
+
if (url == undefined && process.env.MONGO_URL != undefined) {
|
|
6
|
+
url = process.env.MONGO_URL;
|
|
7
|
+
}
|
|
8
|
+
return mongoose.connect(url)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = initialize;
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@drifted/db",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "db module that allows me to establish conventions between projects",
|
|
5
|
+
"homepage": "https://github.com/driftless-group/db#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/driftless-group/db/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/driftless-group/db.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "UNLICENSED",
|
|
14
|
+
"author": "Scott Ballantyne",
|
|
15
|
+
"type": "commonjs",
|
|
16
|
+
"main": "index.js",
|
|
17
|
+
"scripts": {
|
|
18
|
+
"test": "mocha -w"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@drifted/env": "^0.0.2"
|
|
22
|
+
}
|
|
23
|
+
}
|