Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.2 KB

README.md

File metadata and controls

58 lines (41 loc) · 1.2 KB

2a5 Admin

Development

Install your environment

npm install

Run the database server: See 2a5-api.

Prepare your local config:

cp ./.env.development.sample ./.env.development.local

Do changes in ./.env.development.local now and make sure you share the same ADMIN_TOKEN as in 2a5-api.

Check that your API is running as expected via curl:

source .env.development.local && curl localhost:3000/api/token/correct -H "Accept: application/json" -H "Authorization: Bearer ${ADMIN_TOKEN}"

Expected response: {"message":"success"}

Run the nodejs development server:

npm run dev

Check linting:

npm run lint

Start coding and open http://localhost:3002 with your browser of choice to check the result. The system supports hot reload.

Stop it with CTRL+C

Run with Docker

The container will join the existing 2a5 network

docker compose --env-file ./.env.development.local up --build

Stop it:

docker compose --env-file ./.env.development.local down

Cleanup locally

Delete all generated files

rm -rf node_modules/ index.js