Class: Middleman::Cli::Server
- Inherits:
-
Thor
- Object
- Thor
- Middleman::Cli::Server
- Defined in:
- lib/middleman-core/cli/server.rb
Overview
Server thor task
Instance Method Summary collapse
-
#server ⇒ Object
Start the server.
Instance Method Details
#server ⇒ Object
Start the server
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/middleman-core/cli/server.rb', line 50 def server require "middleman-core" require "middleman-core/preview_server" if !ENV["MM_ROOT"] puts "== Could not find a Middleman project config.rb" puts "== Treating directory as a static site to be served" ENV["MM_ROOT"] = Dir.pwd ENV["MM_SOURCE"] = "" end params = { :port => ["port"], :host => ["host"], :environment => ["environment"], :debug => ["verbose"], :instrumenting => ["instrument"], :disable_watcher => ["disable_watcher"], :reload_paths => ["reload_paths"], :force_polling => ["force_polling"] } puts "== The Middleman is loading" ::Middleman::PreviewServer.start(params) end |