Make sure your system meets the system requirements.

Requirements

Clone the sample repository

$ git clone [email protected]:pearlbea/bloaty-mcbloatface.git

From within bloaty-mcbloatface run the following to setup commands

$ bundle install
$ yarn install
$ rails credentials:edit
$ DISABLE_DATABASE_ENVIRONMENT_CHECK=1 RAILS_ENV=production rails db:setup

We have included a seed file that will pre-populate the database with some Hacker News content.

Run the server

We are going to mostly be running in production mode as we want to more realistically measure performance. Production mode takes longer to build but performance a lot of optimizations on CSS/JavaScript delivered to the client.

To perform a one-time production Webpack build and run rails server in production mode:

$ yarn run prod

This will take a minute to start up.

Development mode

If you want to more rapid development flow when not running measurements this will run Webpack and recompile on changes to pack files

$ yarn run dev

And from a second terminal window the following for the rails server

$ rails server

Note that you will have to run rails db:setup first