This project exposes public information for the BSS website. It uses Postgraphile to expose a GraphQL API.
# Go to the bss-web-admin-backend project
# Or clone it if you haven't already
cd ..
git clone [email protected]:BSStudio/bss-web-admin-backend.git
cd bss-web-admin-backend
# Run the admin backend and the database
docker compose up -d --build
# Wait for the app to initialize the database
# Stop the app, mock-file-api (keeping the database only)
docker compose down app mock-file-api
npm install
npm run build
npm run start
Look at the environment variables section to see how to configure the project.
npm run dev
Look at the environment variables section to see how to configure the project.
npm run test
npm run lint
# or
npm run lint:fix
docker build -t bss-web-public-backend .
docker run -p 3000:3000 bss-web-public-backend
Look at the environment variables section to see how to configure the project.
The following environment variables are used to configure the project: You can set them using a .env file or by setting them in the environment.
Name | Default/required | Description |
---|---|---|
PORT | 3000 | The port the server listens on |
DATABASE_CONNECTION_STRING | The connection string to the Postgres database | |
DATABASE_SCHEMA | 'public' | The schema to use in the database |
POSTGRAPHILE_GRAPHIQL | false | Show GraphiQL interface |
POSTGRAPHILE_WATCH_PG | false | Apply changes to the schema automatically |
POSTGRAPHILE_SHOW_ERROR_STACK | false | Show error stack traces |