Skip to content

badgeteam/badgehub-api

Repository files navigation

BadgeHub API

Node project for the BadgeHub API

Note

Currently, this is for development only.

Install

Make sure Docker is installed and running.

In the project directory, type

npm install

Run

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.

Stop

To stop BadgeHub

docker compose down

Or, to stop BadgeHub and delete all volumes (to start fresh)

docker compose down --volumes

Database schema

At the moment, this is the database schema:

BadgeHub Schema

Production container

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

About

Node project for the Badgehub API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages