No description
|
|
||
|---|---|---|
| .gitea/workflows | ||
| .github/workflows | ||
| src | ||
| test | ||
| views | ||
| .dockerignore | ||
| .env.example | ||
| .eslintrc.js | ||
| .gitignore | ||
| .prettierrc | ||
| docker-compose.yaml | ||
| Dockerfile | ||
| fly.toml | ||
| nest-cli.json | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| yarn.lock | ||
us.dev Generalized API
AKA the monolith
Quickstart
Dependencies:
- Docker
- Node 18
# Copy example .env
cp .env.example .env
# Install Dependencies
yarn
# Start local services
docker compose up -d
# Start Application
yarn start:dev
# Log in with development user (admin) and dev password (password)
curl --request POST \
--url http://localhost:3000/auth/login \
--header 'Content-Type: application/json' \
--data '{
"username":"admin",
"password":"password"
}'
The Login command will return a JSON object with access_token. You can then
head over to http://localhost:3000/api, click the "Authorize" button, and enter
the access_token. This will then be applied to all of the endpoints that
require auth on the API page.
Configuration
Supply the following environment variables:
| Env Name | Description |
|---|---|
| JWT_SECRET | A big string to use as the JWT token secret |
| ADMIN_PASS | The password for the admin user |