This repo contains highly experimental code. Expect rapid iteration.
Create the .env
file with the correct environment variables.
Copy the .env.example
file and modify the values according to your setup.
Make sure docker-compose
is installed (see Installation instructions).
docker-compose up -d
Make sure Diesel CLI
is installed (see installation instructions):
Then, use Diesel
to initialize the data model and the database:
source .env
diesel setup
diesel migration run
To build the project, run the following command:
cargo build
Below are some examples of usage.
See Hasura documentation.
For convenience, some commands are available from the root of the repo:
make hasura/start # Apply metadata and start the console
cargo run &
curl -d '{"owner":"onlydustxyz", "name":"starkonquest"}' -H "Content-Type: application/json" -X POST http://localhost:8000/projects
cargo test
TODO
- To create a new migration, start running
diesel migration generate <your-migration-name>
- Edit the generated files with your SQL code for
up.sql
anddown.sql
- Test your migration up and down by running
diesel migration run
diesel migration revert
diesel migration run
- The file
schema.rs
should be then automatically updated
We use Datadog as a monitoring solution.
$~ heroku drains --json --app onlydust-backend-staging
[
{
"id": "459e4e77-bbaa-4be2-8237-98fafe856d19",
"url": "https://http-intake.logs.datadoghq.eu/api/v2/logs/?dd-api-key=$API_KEY&ddsource=heroku&env=staging&service=marketplace-backend&host=staging.api.onlydust.xyz",
...
}
]
$~ heroku drains --json --app onlydust-backend-production
[
{
"id": "c0b077bf-f0cc-4049-80e9-5b55e18d701a",
"url": "https://http-intake.logs.datadoghq.eu/api/v2/logs/?dd-api-key=$API_KEY&ddsource=heroku&env=production&service=marketplace-backend&host=api.onlydust.xyz",
...
}
]
marketplace-backend is released under MIT.