update code

This commit is contained in:
Alexander Popov 2022-11-07 00:07:40 +03:00
parent eeb05fa7d1
commit a0d5dbab6c
4 changed files with 9 additions and 3 deletions

View File

@ -1,8 +1,8 @@
name: Services
version: 0.1.0
# authors:
# - name <email@example.com>
authors:
- Alexander Popov <iiiypuk@fastmail.fm>
# description: |
# Short description of ServicesCheck

View File

@ -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"

View File

@ -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"