forked from objy-org/spoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.js
More file actions
54 lines (46 loc) · 1.15 KB
/
example.js
File metadata and controls
54 lines (46 loc) · 1.15 KB
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
var Platform = require('./index.js');
var OBJY = require('objy');
OBJY.define({
name: "user",
pluralName: "users",
authable: true,
storage:
})
OBJY.define({
name: "object",
pluralName: "objects"
})
var P = Platform.REST({
port: 80,
OBJY,
extensions: [{
route: '/:entity/:id/property/:propName/call',
authable: true,
tenancyContext: true,
appContext: true,
methods: {
post: (req, res) => {
}
}
}]
}).run();
/*
SPOO.OBJY.client('default');
SPOO.OBJY.user({username: "sdgsg"}).add(usr => {
console.log('dummy added')
})
var P = SPOO.REST({
port: 80,
oauth: {
clientId: '229184211896-83tnprfe9asspohej7rftutrsv1dchbb.apps.googleusercontent.com',
clientSecret: 'mgAnCUo1JxAoR1Thq4oJtZY5',
accessTokenUri: 'https://accounts.google.com/o/oauth2/token',
authorizationUri: 'https://accounts.google.com/o/oauth2/v2/auth',
redirectUri: 'http://localhost/api/client/default/auth-callback',
scopes: ['profile', 'email', 'openid'],
userFieldsMapping: {
email: 'email'
}
}
}).run();
*/