Closed Hopeberg closed 8 months ago
would break prod because the docker compose expect to use this path for db. it works there fine because docker volumes folder are created automatically if they don't exist. if you run it without docker it should created the folder by code, however there was a bug, the error checking was wrong coz I wrote it like in 30sec during the lecture when we needed to have it done. so my bad. but I fixed it in PR. please check.
you might argue that why don't we just put the file to the root of api folder. it was like that however it's difficult to pass just one file using docker volumes that's why we chose to have the sqlite folder. the reason for this is that you cannot pass a file that doesn't exist yet because the db is created by the api. you would have to create an empty file than override it with the db. it's much easier to just pass an empty directory
Co-authored by: Rasmus Nordbjærg Co-authored by: Roman
/sqlite/minitwit.db does not exist, so we updated the path to minitwit-api/minitwit.db in connect_db()