joy-framework / joy

A full stack web framework written in janet
https://joy.swlkr.com
MIT License
537 stars 30 forks source link

db/connect does not use the .env file as documented #88

Closed LeviSchuck closed 3 years ago

LeviSchuck commented 3 years ago

In the docs https://github.com/joy-framework/joy/blob/master/docs/database-queries.md

The code

(db/connect)

Should be reading either DATABASE_URL from the environment, or look in the .env file with (env :database-url)

Instead, what I must do to use the .env file is use

(db/connect (env :database-url))

I am able to start the application with

DATABASE_URL=./development.sqlite3  joy server

while using

(db/connect)

And I am able to start the application with

 joy server

while using

(db/connect (env :database-url))