-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
43 lines (40 loc) · 807 Bytes
/
config.yaml
File metadata and controls
43 lines (40 loc) · 807 Bytes
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
bind:
- 127.0.0.1:8080
databases:
test:
options:
try_json: true
url: sqlite://test.db
endpoints:
- method: GET
path: /foo
query:
steps:
- map:
- |
{ data: . }
query: select * from foo
transaction: 0
transactions:
- db: test
isolation: none
- method: GET
path: /foo/:id
path_params:
id:
map: [tonumber]
query:
steps:
- args:
- path: id
map:
- |
if length == 0 then
{ __response: { status: 404 } }
else
{ data: first }
end
query: select * from foo where id = ? limit 1
transactions:
- db: test
isolation: none