Node project for the BadgeHub API
Note
Currently, this is for development only.
Make sure Docker is installed and running.
In the project directory, type
npm install
Before running, copy the .env.example
into .env
cp .env.example .env
and fill out the details.
Then start the Docker containers by typing
docker compose up --detach
Then visit http://localhost:8001/ for the development BadgeHub homepage.
Visit http://localhost:8002/ for the pgAdmin interface.
Use password badgehub
to connect to the BadgeHub database server.
Use the OpenAPI (Swagger) documentation to interact with the REST API.
To stop BadgeHub
docker compose down
Or, to stop BadgeHub and delete all volumes (to start fresh)
docker compose down --volumes
At the moment, this is the database schema:
In production, use the production docker compose file.
The NODE_ENV
environment file is set to production
, there's no watcher and
PM2 is used to run Node.js multithreaded.
To start:
docker compose --file docker-compose-production.yml up --detach
Then visit http://localhost:9002/ for the production BadgeHub homepage.
To wind down:
docker compose --file docker-compose-production.yml down