You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Ken Aguilar 5e3a76a2fa
updated stack to lts-18.10 (#2)
1 week ago
app initial 1 month ago
assets initial resource - create guest (#3) 2 weeks ago
config initial resource - create guest (#3) 2 weeks ago
flyway/sql initial resource - create guest (#3) 2 weeks ago
nix updated stack to lts-18.10 (#2) 1 week ago
src updated stack to lts-18.10 (#2) 1 week ago
test updated stack to lts-18.10 (#2) 1 week ago
.gitignore initial 1 month ago
.stylish-haskell.yaml initial resource - create guest (#3) 2 weeks ago
LICENSE add license 2 weeks ago
Makefile initial resource - create guest (#3) 2 weeks ago
README.md Update readme to include yesod installation (#3) 1 week ago
docker-compose.yml initial resource - create guest (#3) 2 weeks ago
package.yaml updated stack to lts-18.10 (#2) 1 week ago
shell.nix updated stack to lts-18.10 (#2) 1 week ago
stack.yaml updated stack to lts-18.10 (#2) 1 week ago
stack.yaml.lock updated stack to lts-18.10 (#2) 1 week ago

README.md

real-world-yesod

Database Setup

Start a development database

docker-compose up db-dev

Run migrations on development database

docker-compose up flyway-dev

Start a test database

docker-compose up db-test

Run migrations on test database

docker-compose up flyway-test

Haskell Setup

Tools required:

  • Stack
  • ghcid
  • yesod

For nix users

Start a shell with

nix-shell

Development

Install yesod with:

stack install yesod-bin --install-ghc

Start a development server with:

stack exec -- yesod devel

As your code changes, your site will be automatically recompiled and redeployed to localhost.

Development with ghcid

To run type checking on lib

make ghcid-lib

To run type checking on unit tests

make ghcid-unit-test

Interacting with the Application

Start a development server and go to localhost:3000 or whatever is theport value in config/settings.yml

yesod devel

Tests

Run all tests

stack test

Run unit tests

stack test :unit

Run integrations tests

stack test :integration

Nix

Global stack configuration.

nix:
  enable: true
  packages: [ postgresql, zlib.dev, zlib.out ]