Skip to content

Commit fea17ca

Browse files
Berkeley MartinezBerkeley Martinez
authored andcommitted
add initial client config for loopback client
1 parent cc9af1c commit fea17ca

6 files changed

Lines changed: 70 additions & 0 deletions

File tree

client/config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"restApiRoot": "/api",
3+
"remoting": {
4+
"context": {
5+
"enableHttpContext": false
6+
}
7+
}
8+
}

client/config.local.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
var globalConfig = require('../common/config.global');
2+
3+
module.exports = {
4+
restApiRoot: globalConfig.restApi
5+
};

client/datasources.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"remote": {
3+
"name": "remote",
4+
"connector": "remote"
5+
},
6+
"local": {
7+
"name": "local",
8+
"connector": "memory"
9+
}
10+
}

client/datasources.local.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
var globalConfig = require('../common/config.global');
2+
3+
module.exports = {
4+
remote: {
5+
url: globalConfig.restApiUrl
6+
}
7+
};

client/loopbackClient.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var loopback = require('loopback'),
2+
boot = require('loopback-boot');
3+
4+
var app = loopback();
5+
6+
boot(app, __dirname);
7+
8+
module.exports = app;

client/model-config.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"_meta": {
3+
"sources": [
4+
"../common/models",
5+
"./models"
6+
]
7+
},
8+
"user": {
9+
"dataSource": "remote"
10+
},
11+
"bonfire": {
12+
"dataSource": "remote"
13+
},
14+
"challenge": {
15+
"dataSource": "remote"
16+
},
17+
"comment": {
18+
"dataSource": "remote"
19+
},
20+
"fieldGuide": {
21+
"dataSource": "remote"
22+
},
23+
"job": {
24+
"dataSource": "remote"
25+
},
26+
"nonprofit": {
27+
"dataSource": "remote"
28+
},
29+
"story": {
30+
"dataSource": "remote"
31+
}
32+
}

0 commit comments

Comments
 (0)