Giter VIP home page Giter VIP logo

zio-http4s-doobie-auth-example's Introduction

zio-http4s-doobie-auth-example

Welcome to my ZIO playground. After I visited a scala meetup where Wiem presented the ZIO framework, I knew I had to dig into this.

I included my favourite frameworks:

  • http4s
  • circe
  • doobie
  • postgres
  • pureconfig

What can I do with this?

It's a really simple app and just has to http access point:

  1. Show alle existing users in a database via the Root route
  2. Allow existing users too authenticate via the /secure route

How to run it?

As always, check out the git repo:

git clone [email protected]:don41382/zio-http4s-doobie-auth-example.git

Compose the docker instance, to have access to a postgres instance on port 54320

docker-compose up -d

And in the end, run sbt with the sbt-resolver plugin command

sbt "~reStart"

Done! Now you can play around. Change things and make your own picture of the awesomeness of zio.

Login to the secure area

  1. Username: "Felix", password: "password"
  2. Username: "Klaus", password: "123456"

Issue

This project also helped me to understand, how to catch defect in http4s.

For more details, checkout the issue on this.

Thanks

Just a quick thanks for the support to Wiem and Kai for helping me to understand the error handling in ZIO/http4s.

zio-http4s-doobie-auth-example's People

Contributors

felix41382 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

eschizoid bestils

zio-http4s-doobie-auth-example's Issues

Update to zio 1.0.x

Any chance this could be updated to zio 1.0.x? I haven't tried but I expect this to be quite outdated by now?

Or maybe a pointer to a more modern version?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.