Skip to content

This project shows ZIO integration in a playframework application

License

Notifications You must be signed in to change notification settings

loicdescotte/play-zio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Play / ZIO integration

This project shows ZIO integration in a playframework application.

Run the project

sbt ~run 

Apis

List users

curl -XGET http://localhost:9000/users

Create a user

curl -XPOST http://localhost:9000/users -H 'Content-Type: application/json' -d '
    {
        "email": "[email protected]", 
        "name": "Ragnar Lodbrock",
        "birthDate": "1981-04-01"
    }' | jq

Validation error :

curl -XPOST http://localhost:9000/users -H 'Content-Type: application/json' -d '
    {
        "email": "[email protected]", 
        "name": "Ragnar Lodbrock",
        "birthDate": "1981-04-01", 
        "drivingLicenceDate": "1995-04-01"
    }' | jq

Update a user

curl -XPUT http://localhost:9000/users/[email protected] -H 'Content-Type: application/json' -d '
    {
        "email": "[email protected]", 
        "name": "Ragnar Lodbrock",
        "birthDate": "1981-04-01"
    }' | jq

Delete a user

curl -XDELETE http://localhost:9000/users/[email protected] --include

get a user

curl -XGET http://localhost:9000/users/[email protected]

About

This project shows ZIO integration in a playframework application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%