Class: Openbox::Commands::Server

Inherits:
Openbox::Command show all
Defined in:
lib/openbox/commands/server.rb

Overview

The Server Command

Since:

  • 0.1.0

Instance Method Summary collapse

Methods inherited from Openbox::Command

#before_execute

Instance Method Details

#executeObject

Run Application Server

Since:

  • 0.1.0



13
14
15
16
17
18
19
# File 'lib/openbox/commands/server.rb', line 13

def execute
  Openbox.database.ensure_connection!
  invoke Migrate unless ENV['AUTO_MIGRATION'].nil?
  return exec('bundle exec rails server -b 0.0.0.0') if Openbox.runtime.rails?

  exec('bundle exec rackup -o 0.0.0.0')
end