- initial commit

This commit is contained in:
Alex Ling
2020-02-11 22:06:17 +00:00
commit 3c2b054ec8
15 changed files with 324 additions and 0 deletions

25
src/mango.cr Normal file
View File

@@ -0,0 +1,25 @@
require "kemal"
require "./config"
require "./library"
require "./storage"
require "./auth_handler"
config = Config.load
library = Library.new config.library_path
storage = Storage.new config.db_path
get "/" do
"Hello World!"
end
# APIs
get "/api/test" do |env|
"Hello!"
end
add_handler AuthHandler.new
Kemal.config.port = config.port
Kemal.run