alpha
Login
or
Join now
jamie.schembri.me
/
crapi
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
[READ-ONLY] Mirror of https://github.com/shkm/crapi. 📠 A HTTP API for your JSON/YAML files
crystal
json
key-value-store
yaml
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
bug: get it compiling again
author
Jamie Schembri
date
3 years ago
(Dec 22, 2022, 4:49 PM +0100)
commit
800cc881
800cc8818af44c9053cdb68158f920f86509e95c
parent
6b658f7f
6b658f7ff3c6cd5ba5c2def46e984ac6bbd5abd6
+2
-2
1 changed file
Expand all
Collapse all
Unified
Split
src
crapi.cr
+2
-2
src/crapi.cr
View file
Reviewed
···
101
101
end
102
102
103
103
104
104
-
def serve(data)
104
104
+
def serve(data : AnyDataType, options : Options)
105
105
server = HTTP::Server.new do |context|
106
106
keys = path_to_lookup_keys(context.request.path)
107
107
value = dig_data?(data, keys)
···
125
125
options = Options.parse
126
126
data = parse_file(options.file_path)
127
127
128
128
-
serve(data)
128
128
+
serve(data, options)
129
129
end
130
130
131
131
main