forked from formio/resquel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.json
38 lines (38 loc) · 1.17 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
{
"db": {
"client": "mysql",
"connection": {
"host": "127.0.0.1",
"user": "your_database_user",
"password": "your_database_password",
"database": "myapp_test"
}
},
"routes": [
{
"method": "get",
"endpoint": "/customer",
"query": "SELECT * FROM customers;"
},
{
"method": "post",
"endpoint": "/customer",
"query": "INSERT INTO customers (firstName, lastName, email) VALUES ('{{ data.firstName }}', '{{ data.lastName }}', '{{ data.email }}');SELECT * FROM customers WHERE id=SCOPE_IDENTITY();"
},
{
"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 }};"
}
]
}