Class: Bowtie::Commands::Serve
- Inherits:
-
Bowtie::Command
- Object
- Bowtie::Command
- Bowtie::Commands::Serve
- Defined in:
- lib/bowtie/commands/serve.rb
Class Method Summary collapse
Methods inherited from Bowtie::Command
Class Method Details
.init_with_program(prog) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/bowtie/commands/serve.rb', line 5 def init_with_program(prog) command = Jekyll::Commands::Serve.init_with_program(prog) command.description 'Development server' command.actions.clear command.action do |args, | ['serving'] = true ['watch'] = true unless .key?('watch') Jekyll::Commands::Build.process() Bowtie::Commands::Serve.process() end end |
.process(options) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/bowtie/commands/serve.rb', line 19 def process() Bowtie::Middleware::PolicyCheck.watch! Rack::Server.start(app: application(), Port: ['port'] || 4000, Host: ['host'], daemonize: ['detach']) end |