Skip to content

Commit

Permalink
Add more instructions how to setup (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
veelenga authored Sep 29, 2017
1 parent 9c38239 commit 6bf8ebf
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,42 @@

Source code for https://crystal-ann.com.

## Develop
## Setup

Create a pg database called `crystal_ann`. Then:
1. [Install Crystal](https://crystal-lang.org/docs/installation/index.html)
2. [Install Amber Framework](https://docs.amberframework.org/getting-started/Installation/)
3. [Install Postgres](http://postgresguide.com/setup/install.html)
4. Create `crystal_ann` and `crystal_ann_test` pg databases

## Development

1. Install project dependencies:

```
$ crystal deps
```

2. Run database migrations:

```
$ shards update
$ amber migrate up
```

3. Create seed data:

```
$ crystal db/seed.cr
```

4. Start app and watch for source changes:

```
$ amber watch
```

## Test
## Testing

Create a pg database called `crystal_ann_test`. Then:
Migrate test database and run specs:

```
$ MICRATE_RUN_UP=true crystal spec
Expand Down

0 comments on commit 6bf8ebf

Please sign in to comment.