aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-03-05 19:23:06 -0500
committerPaul Duncan <pabs@pablotron.org>2016-03-05 19:23:06 -0500
commit95e31f6daffb634690ad910a621ba907987ab9c9 (patch)
tree73fdcd01cad03dc303893af3dd05bf436aaa556b
parent17a15f5c52f88aa44499ac267330e5635f6051b5 (diff)
downloadold-guff-95e31f6daffb634690ad910a621ba907987ab9c9.tar.bz2
old-guff-95e31f6daffb634690ad910a621ba907987ab9c9.zip
refactor run
-rw-r--r--src/guff.cr11
-rw-r--r--src/guff/run.cr16
2 files changed, 16 insertions, 11 deletions
diff --git a/src/guff.cr b/src/guff.cr
index a429ee4..174ec67 100644
--- a/src/guff.cr
+++ b/src/guff.cr
@@ -22,17 +22,6 @@ module Guff
end
end
end
-
- def self.run(app, args)
- # parse env and cli options
- config = Config.new(app, args)
-
- # create model
- model = Model.new(config)
-
- # create and run server
- Server.run(model, config)
- end
end
Guff.run($0, ARGV)
diff --git a/src/guff/run.cr b/src/guff/run.cr
new file mode 100644
index 0000000..2b7e966
--- /dev/null
+++ b/src/guff/run.cr
@@ -0,0 +1,16 @@
+require "./config"
+require "./model"
+require "./server"
+
+module Guff
+ def self.run(app, args)
+ # parse env and cli options
+ config = Config.new(app, args)
+
+ # create model
+ model = Model.new(config)
+
+ # create and run server
+ Server.run(model, config)
+ end
+end