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 name: Services
version: 0.1.0 version: 0.1.0
# authors: authors:
# - name <email@example.com> - Alexander Popov <iiiypuk@fastmail.fm>
# description: | # description: |
# Short description of ServicesCheck # Short description of ServicesCheck

View File

@ -8,7 +8,7 @@ CONFIG.class
APP = {version: "1.0.0"} APP = {version: "1.0.0"}
get "/" do get "/" do
render "public/index.html" render "#{__DIR__}/layouts/index.ecr"
end end
Kemal.config.env = "development" Kemal.config.env = "development"

View File

@ -1,6 +1,12 @@
require "json" require "json"
require "http/client" require "http/client"
# Return latest Minecraft version
#
# Output:
# ```
# 1.19.2
# ```
get "/api/v1.0/minecraft_version" do |env| get "/api/v1.0/minecraft_version" do |env|
minecraft_url = "https://launchermeta.mojang.com/mc/game/version_manifest_v2.json" minecraft_url = "https://launchermeta.mojang.com/mc/game/version_manifest_v2.json"