diff --git a/package.json b/package.json index 6b80cce..d9b900f 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "lint": "eslint .", "start": "node .", "posttest": "npm run lint && nsp check", + "develop": "./node_modules/nodemon/bin/nodemon.js --debug .", "test-api": "./node_modules/dredd/bin/dredd openapi.yaml http://localhost:3000/v1" }, "dependencies": { @@ -19,6 +20,7 @@ "loopback": "^3.0.0", "loopback-boot": "^2.6.5", "loopback-component-explorer": "^5.0.0", + "loopback-connector-mongodb": "^3.2.1", "serve-favicon": "^2.0.1", "strong-error-handler": "^2.0.0" }, @@ -26,6 +28,7 @@ "dredd": "^4.5.0", "eslint": "^3.17.1", "eslint-config-loopback": "^8.0.0", + "nodemon": "^1.12.1", "nsp": "^2.1.0" }, "repository": { diff --git a/server/datasources.json b/server/datasources.json index d6caf56..49fa9ae 100644 --- a/server/datasources.json +++ b/server/datasources.json @@ -2,5 +2,9 @@ "db": { "name": "db", "connector": "memory" + }, + "document": { + "connector": "mongodb", + "url": "${MONGO_URI}" } } diff --git a/server/model-config.json b/server/model-config.json index 0ed248d..5c0764d 100644 --- a/server/model-config.json +++ b/server/model-config.json @@ -14,46 +14,46 @@ ] }, "User": { - "dataSource": "db", + "dataSource": "document", "public": false }, "AccessToken": { - "dataSource": "db", + "dataSource": "document", "public": false }, "ACL": { - "dataSource": "db", + "dataSource": "document", "public": false }, "RoleMapping": { - "dataSource": "db", + "dataSource": "document", "public": false, "options": { "strictObjectIDCoercion": true } }, "Role": { - "dataSource": "db", + "dataSource": "document", "public": false }, "NGO": { - "dataSource": "db", + "dataSource": "document", "public": true }, "Demand": { - "dataSource": "db", + "dataSource": "document", "public": true }, "Thing": { - "dataSource": "db", + "dataSource": "document", "public": false }, "Organization": { - "dataSource": "db", + "dataSource": "document", "public": false }, "LocalUser": { - "dataSource": "db", + "dataSource": "document", "public": true } }