diff --git a/shard.yml b/shard.yml index a4f1726..1b1191f 100644 --- a/shard.yml +++ b/shard.yml @@ -1,8 +1,8 @@ name: Services version: 0.1.0 -# authors: -# - name +authors: + - Alexander Popov # description: | # Short description of ServicesCheck diff --git a/src/Services.cr b/src/Services.cr index d0bf292..905bb27 100644 --- a/src/Services.cr +++ b/src/Services.cr @@ -8,7 +8,7 @@ CONFIG.class APP = {version: "1.0.0"} get "/" do - render "public/index.html" + render "#{__DIR__}/layouts/index.ecr" end Kemal.config.env = "development" diff --git a/public/index.html b/src/layouts/index.ecr similarity index 100% rename from public/index.html rename to src/layouts/index.ecr diff --git a/src/modules/minecraft_version.cr b/src/modules/minecraft_version.cr index bc8935c..d4b286b 100644 --- a/src/modules/minecraft_version.cr +++ b/src/modules/minecraft_version.cr @@ -1,6 +1,12 @@ require "json" require "http/client" +# Return latest Minecraft version +# +# Output: +# ``` +# 1.19.2 +# ``` get "/api/v1.0/minecraft_version" do |env| minecraft_url = "https://launchermeta.mojang.com/mc/game/version_manifest_v2.json"