Module: WatchTower::Server

Extended by:
ActiveSupport::Autoload
Defined in:
lib/watch_tower/server.rb,
lib/watch_tower/server/app.rb,
lib/watch_tower/server/helpers.rb,
lib/watch_tower/server/database.rb,
lib/watch_tower/server/presenters.rb,
lib/watch_tower/server/models/file.rb,
lib/watch_tower/server/helpers/asset.rb,
lib/watch_tower/server/configurations.rb,
lib/watch_tower/server/models/project.rb,
lib/watch_tower/server/models/duration.rb,
lib/watch_tower/server/models/time_entry.rb,
lib/watch_tower/server/helpers/presenters.rb,
lib/watch_tower/server/configurations/asset.rb,
lib/watch_tower/server/helpers/improved_partials.rb,
lib/watch_tower/server/presenters/file_presenter.rb,
lib/watch_tower/server/presenters/project_presenter.rb,
lib/watch_tower/server/presenters/application_presenter.rb

Defined Under Namespace

Modules: Configurations, Database, Helpers, Presenters Classes: App, Duration, File, Project, TimeEntry

Class Method Summary collapse

Class Method Details

.start(options = {}) ⇒ Object

Start the server This method starts the database and then starts the server

Parameters:

  • options (Hash) (defaults to: {})


21
22
23
24
25
26
27
# File 'lib/watch_tower/server.rb', line 21

def self.start(options = {})
  # Start the Database
  Database.start!(options)

  # Start the Sinatra application
  start_web_server(options)
end

.start!(options = {}) ⇒ Object

Start the Server, a method invoked from the Watch Tower command line interface

Parameters:

  • options (Hash) (defaults to: {})


32
33
34
# File 'lib/watch_tower/server.rb', line 32

def self.start!(options = {})
  start(options)
end