Update README document for start up instructions.

This commit is contained in:
Chad Serrant 2021-09-27 16:43:28 -04:00 committed by rebuilt
parent 1699d65cc0
commit 5bed6bfcea
2 changed files with 18 additions and 12 deletions

View file

@ -9,6 +9,15 @@ This is a Rails project, deployed on Heroku.
## Local development
Install Postgres and running first.
(MacOS, Optional), you can use Homebrew:
```
$ brew install postgres
$ brew services start postgresql
```
Once postgres is installed and running, install the required gems and then migrate the database.
```
$ bundle install
$ bundle exec rake db:create db:migrate db:seed
@ -28,22 +37,14 @@ You can load these into the database and index them for use in the webapp by run
You can start by generating fake data:
```
$ bundle exec rake data:generate
$ bundle exec rake db:fixtures:load
```
Loading all the real response data take a while, so you can start by loading only a sample of the data for one particular school with:
## Running tests
```
$ bundle exec rake data:load_sample
$ bundle exec rake test
```
This loads all the data:
```
$ bundle exec rake data:load
```
## Demo deploy
Get the code and make a new repo without any history.
```
@ -98,4 +99,4 @@ Loading attempts took a while. I factored data rake task out into Ruby class to
- superadmin is done by user id
- no schools for default user?
- endpoints for school/categories, school/questions
- attempts route and controller commented out
- attempts route and controller commented out