Skip to content

samuelorji/ZIO-AKKAHTTP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZIO-AKKAHTTP

Codebase for this article on beginning functional programming using ZIO

A really Simple Todo App built functionally using ZIO and Akka HTTP to connect to a Mysql Database. The codebase is quite verbose and riddled with comments to help the newbie understand the thought process :)

USAGE

From The command Line

All commands are run from the root of the project

Starting the Database

docker-compose -f ./scripts/docker/docker-compose.yml up

Once the database is up and running, run this script to create the database and tables as well as insert mock data.

./scripts/deploy.sh

Starting the server

to specify port to run on, you can pass the port argument to sbt

sbt "run <port_number>"

default port is 8082

API ROUTES

GET -> /todo

Get All Todos

POST -> /todo << {"name" : "todo_name"}

Create new Todo

GET,DELETE -> /todo/1

Get or delete Todo with Id 1

About

Programming with effects using ZIO and AKKA HTTP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published