Skip to content

kowainik/piece-of-cake-slayer

Repository files navigation

piece-of-cake-slayer

logo

GitHub CI

Template project for a web application based on the cake-slayer architecture.

How to build?

Backend

Run the following command

cabal build

or

stack build

(it will take a while when run for the first time)

Frontend

How to run?

Database

Run PostgreSQL database in one terminal window:

docker run -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres:12

Backend

Run backend

cabal run piece-of-cake-slayer

Frontend

Then open localhost:8000 in your browser.

Test

Testing backend via curl:

$ curl localhost:8080/items

$ curl -XPOST \
    -H 'Content-Type: application/json' \
    localhost:8080/createItem \
    -d '{"tag": "Item", "text": "New item"}'

$ curl -XPOST \
    -H 'Content-Type: application/json' \
    localhost:8080/deleteItem \
    -d '1'

About

🍰🍴Template project based on the cake-slayer architecture library

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published