ZIO 2
Features tested:
- cache
- config
- direct
- fiber
- http
- json
- queue
- interrupt
- zlayer
- logging
- promise
- quill
- ref/fiber ref
- resources
- scalafx
- streams
- schedule
- test
Build
- sbt clean compile
Test
- sbt clean test
Run
- sbt run Multiple main classes detected. Select one to run:
- objektwerks.CacheApp
- objektwerks.ClockApp
- objektwerks.CombinerApp
- objektwerks.ConsoleApp
- objektwerks.HttpServer
- objektwerks.InterruptApp
- objektwerks.LoggerApp
- objektwerks.ParApp
- objektwerks.QuillH2App
- objektwerks.QuillPostgreSqlApp
- objektwerks.RandomApp
- objektwerks.STMApp
- objektwerks.ScalaFxApp
- objektwerks.ScheduleApp
- objektwerks.SemaphoreApp
- objektwerks.ServicePatternApp
- objektwerks.SubscriptionApp
- objektwerks.SystemApp
- objektwerks.ValidateApp
- objektwerks.ZIODirect
Curl
Use the following curl sequences to target HttpServer:
- curl -v http://localhost:7272/now
- curl -d "Fred Flintstone" -v http://localhost:7272/greeting
- curl --header "Content-Type: application/json" --request POST --data '{"Add":{"x":1,"y":1}}' http://localhost:7272/command
- curl --header "Content-Type: application/json" --request POST --data '{"Multiply":{"x":1,"y":2}}' http://localhost:7272/command
- curl --header "Content-Type: application/json" --request POST --data '{"Fake":{"x":1,"y":2}}' http://localhost:7272/command
Postgresql Database
Example database url: postgresql://localhost:5432/todo?user=tripletail&password=
- psql postgres
- CREATE DATABASE todo OWNER your computer name.;
- GRANT ALL PRIVILEGES ON DATABASE todo TO your computer name.;
- \l
- \q
- psql todo
- \i pg-ddl.sql
- \q
Postgresql DDL
- psql todo
- \i pg-ddl.sql
- \q