-
Notifications
You must be signed in to change notification settings - Fork 37
/
config.json
50 lines (50 loc) · 1.27 KB
/
config.json
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
{
"db": {
"client": "mysql",
"connection": {
"host": "localhost",
"user": "root",
"password": "CHANGEME",
"database": "formio"
}
},
"routes": [
{
"method": "get",
"endpoint": "/customer",
"query": [
["SELECT * FROM customers;"]
]
},
{
"method": "post",
"endpoint": "/customer",
"query": [
[
"INSERT INTO customers (firstName, lastName, email) VALUES (?, ?, ?)",
"body.data.firstName",
"body.data.lastName",
"body.data.email"
],
[
"SELECT * FROM customers WHERE id=LAST_INSERT_ID();"
]
]
},
{
"method": "get",
"endpoint": "/customer/:customerId",
"query": "SELECT * FROM customers WHERE id={{ params.customerId }};"
},
{
"method": "put",
"endpoint": "/customer/:customerId",
"query": "UPDATE customers SET firstName='{{ data.firstName }}', lastName='{{ data.lastName }}', email='{{ data.email }}' WHERE id={{ params.customerId }};SELECT * FROM customers WHERE id={{ params.customerId }};"
},
{
"method": "delete",
"endpoint": "/customer/:customerId",
"query": "DELETE FROM customers WHERE id={{ params.customerId }};"
}
]
}