aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2019-10-08 17:04:21 +0000
committers-ol <s-ol@users.noreply.github.com>2019-10-08 17:04:21 +0000
commitca96a23197e3d1dcb11b68cc1d15aafa516d5ac9 (patch)
treec229acaa1192d50bf8219b7917c881ea38ff52b6 /build
parentadd anything -> URL cast (diff)
downloadmmm-ca96a23197e3d1dcb11b68cc1d15aafa516d5ac9.tar.gz
mmm-ca96a23197e3d1dcb11b68cc1d15aafa516d5ac9.zip
realtime server Dockerfile
Diffstat (limited to 'build')
-rw-r--r--build/import.moon4
-rw-r--r--build/render_all.moon2
-rw-r--r--build/server.moon6
3 files changed, 6 insertions, 6 deletions
diff --git a/build/import.moon b/build/import.moon
index aa8250e..ceb56ad 100644
--- a/build/import.moon
+++ b/build/import.moon
@@ -14,7 +14,7 @@ import SQLStore from require 'mmm.mmmfs.drivers.sql'
-- usage:
-- moon import.moon <root> [output.sqlite3]
-{ root, output } = arg
+{ root, file } = arg
assert root, "please specify the root directory"
@@ -30,7 +30,7 @@ load_facet = (filename, filepath) ->
key, value
-with SQLStore name: output, verbose: true
+with SQLStore :file, verbose: true
import_fileder = (fileder, dirpath) ->
for file in lfs.dir dirpath
continue if '.' == file\sub 1, 1
diff --git a/build/render_all.moon b/build/render_all.moon
index 7797b7b..259346b 100644
--- a/build/render_all.moon
+++ b/build/render_all.moon
@@ -21,7 +21,7 @@ import load_tree from require 'build.util'
export BROWSER, STATIC
STATIC = true
-tree = load_tree SQLStore :name
+tree = load_tree SQLStore :file
tree = tree\walk startpath if startpath
for fileder in coroutine.wrap tree\iterate
diff --git a/build/server.moon b/build/server.moon
index a9b8431..3731879 100644
--- a/build/server.moon
+++ b/build/server.moon
@@ -163,9 +163,9 @@ class Server
print msg
-- usage:
--- moon server.moon [db.sqlite3]
-{ file } = arg
+-- moon server.moon [db.sqlite3] [host] [port]
+{ file, host, port } = arg
tree = load_tree SQLStore :file
-server = Server tree
+server = Server tree, :host, port: port and tonumber port
server\listen!