wip: currently rewriting the project as a full stack application tangled.org/kacaii.dev/sigo
gleam
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

:recycle: extract db config to variable

Kacaii 95169e5e 49f753a5

+3 -5
+3 -5
src/app.gleam
··· 91 91 ) -> Result(pog.Config, Nil) { 92 92 // Remember to set the enviroment variable before running the app 93 93 use postgres_url <- result.try(envoy.get("DATABASE_URL")) 94 + use config <- result.map(pog.url_config(name, postgres_url)) 94 95 95 96 //  Disable SSL when not in production 96 97 case env { 97 - context.Dev -> pog.url_config(name, postgres_url) 98 - context.Production -> { 99 - use config <- result.map(pog.url_config(name, postgres_url)) 100 - pog.ssl(config, pog.SslVerified) 101 - } 98 + context.Dev -> config 99 + context.Production -> pog.ssl(config, pog.SslVerified) 102 100 } 103 101 } 104 102