16 lines
344 B
Crystal
16 lines
344 B
Crystal
require "spec"
|
|
require "kemal"
|
|
require "../src/spec-kemal"
|
|
|
|
# Create a dummy app
|
|
get "/" do
|
|
"Hello world"
|
|
end
|
|
|
|
post "/user" do |env|
|
|
env.response.content_type = "application/json"
|
|
name = env.params.json["name"]
|
|
age = env.params.json["age"]
|
|
skills = env.params.json["skills"]
|
|
{"name": name, "age": age, "skills": skills}.to_json
|
|
end
|