The source code of https://ctypehub.galaniprojects.de
Make sure you installed these required software before running this project:
After having cloned the repository on your local machine and defining all environment variables according to the .env.example
, to start the app locally follow this steps.
-
Make sure you have all dependencies installed, running:
pnpm install
-
Start the database the app will use, running:
pnpm start-db
The Docker daemon needs to be running for this to work
If there is already a postgres container running, with an incompatible database, you can stop it with pnpm stop-db
.
-
Enter the dev watch mode from astro, running:
pnpm dev
Now you can see the logs of the backend on the terminal and visit the frontend under the URL specified by the variable URL
from the .env
-file.
(By default http://localhost:3000)
The database should start to populate from the configured indexer.
This project consciously did not define a config/config.json
for sequelize.
Instead, it relies on the url
property inside .sequilizerc
.
In turn, the url
takes process.env.DATABASE_URI
as a value.
Before introducing any changes to the database structure you new to recreate the past. For this follow these steps:
-
Make sure you have all dependencies installed, running:
pnpm install
-
Start the database, if not running yet. Locally, you can run:
pnpm start-db
-
Run all past migrations, via:
pnpm migrate
-
Start the project to populate the database, by running:
pnpm dev
After a while, you can stop the project, but the postgres container should continue running.
-
Add the seeds to the database, by running:
pnpm seed
Because the seeds depend on some data, the database needs to be previously populated.