mirror of
https://github.com/hkalexling/Mango.git
synced 2026-03-20 00:00:48 -04:00
- when building for release, embed the static files in binary
This commit is contained in:
@@ -3,6 +3,7 @@ require "./config"
|
||||
require "./library"
|
||||
require "./storage"
|
||||
require "./auth_handler"
|
||||
require "./static"
|
||||
require "./util"
|
||||
|
||||
class Server
|
||||
@@ -276,6 +277,11 @@ class Server
|
||||
end
|
||||
|
||||
add_handler AuthHandler.new @storage
|
||||
{% if flag?(:release) %}
|
||||
# when building for relase, embed the static files in binary
|
||||
serve_static false
|
||||
add_handler StaticHandler.new
|
||||
{% end %}
|
||||
end
|
||||
|
||||
def start
|
||||
|
||||
Reference in New Issue
Block a user