From d94f9c96daf7c50223ec33b0a1bfb9db4ea30fad Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 6 Nov 2022 20:27:59 +0000 Subject: [PATCH] add bones --- server.cr | 15 +++++++++++++++ shard.yml | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 server.cr create mode 100644 shard.yml diff --git a/server.cr b/server.cr new file mode 100644 index 0000000..77ef216 --- /dev/null +++ b/server.cr @@ -0,0 +1,15 @@ +require "kemal" + +get "/" do + "Hello World!" +end + +get "/ip" do |env| + env.response.content_type = "text/plain" + + p! env.request.remote_address.to_s + + "Hello World!" +end + +Kemal.run diff --git a/shard.yml b/shard.yml new file mode 100644 index 0000000..be04824 --- /dev/null +++ b/shard.yml @@ -0,0 +1,18 @@ +name: ips +version: 0.1.0 + +# authors: +# - name + +# description: | +# Short description of ips + +dependencies: + kemal: + github: kemalcr/kemal + +# development_dependencies: +# webmock: +# github: manastech/webmock.cr + +# license: MIT