kowainik / piece-of-cake-slayer

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

Home Page:https://kowainik.github.io/projects/piece-of-cake-slayer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

https://kowainik.github.io/projects/piece-of-cake-slayer

License:Mozilla Public License 2.0


Languages

Language:Haskell 100.0%