diff --git a/README.markdown b/README.markdown index d5a95e4b..fbdcb648 100644 --- a/README.markdown +++ b/README.markdown @@ -6,31 +6,23 @@ Limelight is the app serving the 'new' frontend of the performance platform. (Th https://github.com/alphagov/datainsight-frontend). It gets data from the backdrop api (https://github.com/alphagov/backdrop) and converts it into dashboards and visualisations using backbone and d3.js. -## Starting Limelight serving it's own (stub) data - -Files are served from the `backdrop_stub_controller` which is only routed in dev and test environment. New fixtures can be added in the controller. - -```Shell -BACKDROP_URL=/backdrop_stub bowl limelight -``` - ## Starting Limelight with stub data -To run limelight using stubbed data instead of the backend, set the environment variable `USE_STUB_API` to `true` when you run the application. +To run limelight using stubbed data instead of the backend, set the environment variable `USE_STUB_API` to `true` when you run the application and provide the BACKDROP_PORT unless you are running on port 80. To register stubs, add them to the backdrop controller. Using `bowler`: ```Shell -USE_STUB_API=true bowl limelight +USE_STUB_API=true BACKDROP_PORT=3040 bowl limelight ``` Using `rails`: ```Shell -USE_STUB_API=true rails s +USE_STUB_API=true BACKDROP_PORT=3000 rails s ``` -If you use the latter you will need to set up [slimmer](https://github.com/alphagov/slimmer) yourself. +If you use the latter you will need to set up [slimmer](https://github.com/alphagov/slimmer) yourself or specify STATIC_DEV. ## Tests @@ -82,9 +74,7 @@ java -jar Sauce-Connect.jar ``` Run the tests: -- `GOVUK_ASSET_HOST`: Override the asset host so that assets can be loaded from an already running app. Uses `slimmer/test` if not provided. -- `BROWSER`: platform,browser(,version) see their [list of browsers](https://saucelabs.com/docs/platforms) ```shell -GOVUK_ASSET_HOST='https://static.production.alphagov.co.uk' BROWSER="windows xp,firefox" SAUCE_USERNAME=your-sauce-user-name SAUCE_ACCESS_KEY=your-sauce-key bundle exec cucumber -p sauce +bundle exec rake sauce:cucumber SAUCE_ACCESS_KEY= SAUCE_USERNAME= APP_HOST='http://127.0.0.1:49221' RUN_SERVER=true ``` diff --git a/config/unicorn.rb b/config/unicorn.rb new file mode 100644 index 00000000..b8f2ae6b --- /dev/null +++ b/config/unicorn.rb @@ -0,0 +1,10 @@ +worker_processes 4 +before_exec do |server| + ENV["BUNDLE_GEMFILE"] = "#{ENV.fetch('GOVUK_APP_ROOT')}/Gemfile" +end + +if self.respond_to?('check_client_connection') + check_client_connection true +else + warn "check_client_connection: will not enabled for Unicorn version < 4.5.0" +end