This is the UI project powering Dicebag.
This project uses Trunk for development.
trunk serve
The dicebag
frontend uses the following environment variables:
API_URL
: Defaults tohttp://127.0.0.1:8080/graphql
if not provided
I would like to use dotenv
like the server
project does, but Trunk requires the environment variables to be included in the build at build time. Unfortunately, this doesn't work with CI/CD because there is no .env file. I would prefer to have a
default as I do with the option_env!
macro, but dotenv
doesn't support this at the time of this writing.
When building dicebag
for production use, you must include the API_URL
in the build command.
This project uses the Juniper graphql-client
CLI tool to fetch the server schema.
While running the server
project locally, you can use the following command to update the schema at any time:
graphql-client introspect-schema --output src/graphql/schema.json http://127.0.0.1:8000
This project uses the Juniper graphql-client
CLI tool
graphql-client generate --schema-path src/graphql/schema.json src/graphql/queries.graphql