Add docs tab with local READMEs and login form to monitoring UI
Build and Push Docker Images / detect-changes (pull_request) Successful in 13s
Build and Push Docker Images / build-transit-api (pull_request) Has been skipped
Build and Push Docker Images / build-monitoring-ui (pull_request) Has been skipped
Build and Push Docker Images / deploy-test-node (pull_request) Has been skipped
Build and Push Docker Images / build-employee-api (pull_request) Has been skipped
Build and Push Docker Images / build-auth-api (pull_request) Has been skipped
Build and Push Docker Images / build-error-log-api (pull_request) Has been skipped
Build and Push Docker Images / build-admin-ui (pull_request) Has been skipped
Build and Push Docker Images / detect-changes (push) Successful in 9s
Build and Push Docker Images / build-auth-api (push) Successful in 1m0s
Build and Push Docker Images / build-employee-api (push) Successful in 59s
Build and Push Docker Images / build-transit-api (push) Successful in 57s
Build and Push Docker Images / build-error-log-api (push) Successful in 1m4s
Build and Push Docker Images / build-admin-ui (push) Successful in 1m17s
Build and Push Docker Images / build-monitoring-ui (push) Successful in 1m14s
Build and Push Docker Images / deploy-test-node (push) Successful in 3s
Build and Push Docker Images / detect-changes (pull_request) Successful in 13s
Build and Push Docker Images / build-transit-api (pull_request) Has been skipped
Build and Push Docker Images / build-monitoring-ui (pull_request) Has been skipped
Build and Push Docker Images / deploy-test-node (pull_request) Has been skipped
Build and Push Docker Images / build-employee-api (pull_request) Has been skipped
Build and Push Docker Images / build-auth-api (pull_request) Has been skipped
Build and Push Docker Images / build-error-log-api (pull_request) Has been skipped
Build and Push Docker Images / build-admin-ui (pull_request) Has been skipped
Build and Push Docker Images / detect-changes (push) Successful in 9s
Build and Push Docker Images / build-auth-api (push) Successful in 1m0s
Build and Push Docker Images / build-employee-api (push) Successful in 59s
Build and Push Docker Images / build-transit-api (push) Successful in 57s
Build and Push Docker Images / build-error-log-api (push) Successful in 1m4s
Build and Push Docker Images / build-admin-ui (push) Successful in 1m17s
Build and Push Docker Images / build-monitoring-ui (push) Successful in 1m14s
Build and Push Docker Images / deploy-test-node (push) Successful in 3s
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# Employee API
|
||||
|
||||
Employee management service for XTransit. Handles employee onboarding and records.
|
||||
|
||||
## Setup
|
||||
|
||||
### Environment Variables
|
||||
|
||||
```env
|
||||
PG_HOST=localhost
|
||||
PG_PORT=5432
|
||||
PG_USER=your_user
|
||||
PG_PASS=your_password
|
||||
PG_DB=your_database
|
||||
PORT=4000
|
||||
ERROR_LOG_API_URL=https://error.xtransit.testinstance.nl/error_log
|
||||
```
|
||||
|
||||
### Start API
|
||||
|
||||
```bash
|
||||
npm start
|
||||
```
|
||||
|
||||
Runs at `https://employees.xtransit.testinstance.nl`
|
||||
|
||||
## API Endpoints
|
||||
|
||||
**POST** `/createemployee`
|
||||
- Body: `{ "firstname": "John", "lastname": "Doe", "job": "driver", "password": "secret" }`
|
||||
- Creates employee in `workers.employees` and user in `workers.users`
|
||||
- Returns: `{ "employee": "John", "code": "1234" }`
|
||||
|
||||
**GET** `/health`
|
||||
- Returns: `{ "endpoint": "reachable", "database": "ok" }` or 503 if DB down
|
||||
|
||||
## Database
|
||||
|
||||
Uses `workers.employees` (id, firstname, lastname, job) and `workers.users` (id, employee, password, usercode)
|
||||
Reference in New Issue
Block a user