-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathcomponent.js
116 lines (107 loc) · 2 KB
/
component.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/**
* The api-server component template.
*/
var template = module.exports;
template.package = {
"version": "1.0.0",
"main": "server/server.js",
"scripts": {
"pretest": "jshint .",
},
"dependencies": {
"compression": "^1.0.3",
"errorhandler": "^1.1.1",
"loopback": "^2.8.0",
"loopback-boot": "^2.6.5",
"loopback-datasource-juggler": "^2.7.0",
"serve-favicon": "^2.0.1"
},
"optionalDependencies": {
"loopback-explorer": "^1.1.0"
},
"devDependencies": {
"jshint": "^2.5.6"
},
// Avoid NPM warning
"repository": {
"type": "",
"url": ""
}
};
template.common = {
};
template.server = {
facet: {
modelsMetadata: {
sources: [
'loopback/common/models',
'loopback/server/models',
'../common/models',
'./models',
]
}
},
config: [
{ name: 'restApiRoot', value: '/api' },
{ name: 'host', value: '0.0.0.0' }, // Listen on all interfaces
{ name: 'port', value: 3000 },
{ name: 'remoting', value: {
context: {
enableHttpContext: false
},
rest: {
normalizeHttpPath: false,
xml: false
},
json: {
strict: false,
limit: '100kb'
},
urlencoded: {
extended: true,
limit: '100kb'
},
cors: {
origin: true,
credentials: true
},
errorHandler: {
disableStackTrace: false
}
}}
],
modelConfigs: [
{
name: 'User',
dataSource: 'db'
},
{
name: 'AccessToken',
dataSource: 'db',
public: false
},
{
name: 'ACL',
dataSource: 'db',
public: false
},
{
name: 'RoleMapping',
dataSource: 'db',
public: false
},
{
name: 'Role',
dataSource: 'db',
public: false
}
],
datasources: [
{
name: 'db',
connector: 'memory'
}
]
};
// An API server has no client facet
template.client = null;