https://github.com/ccims/ccims-backend-gql
Backend for the Cross-Component Issue Management System (Gropius) using a GraphQL-API
https://github.com/ccims/ccims-backend-gql
ccims-backend gropius gropius-backend
Last synced: 8 months ago
JSON representation
Backend for the Cross-Component Issue Management System (Gropius) using a GraphQL-API
- Host: GitHub
- URL: https://github.com/ccims/ccims-backend-gql
- Owner: ccims
- Created: 2020-08-27T17:27:23.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-10-01T23:04:47.000Z (over 4 years ago)
- Last Synced: 2023-03-28T00:27:15.259Z (about 3 years ago)
- Topics: ccims-backend, gropius, gropius-backend
- Language: TypeScript
- Homepage:
- Size: 1.49 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CCIMS-Backend
The Backend for the ccims system using nodejs and providing a graphql library
To get a recent version of the api, please use the branch dev
## Schema generation
### Schema for the `/api` access-restricted endpoint
For generating the schema file at `schema/schema.graphql` execute:
```
npm run schema schema/schema.graphq
```
This will generate a commented graphql schema from the most recent code version.
Printing schema to stdout: `npm run --silent schema`
### Schema for the `/api/public` public user registration endpoint
For generating the schema file at `schema/public.graphql` execute:
```
npm run schema -- schema/public.graphq -p
```
This will generate a commented graphql schema from the most recent code version.
Printing schema to stdout: `npm run --silent schema -- -p`
# Usage / Installation
## No Login
If you want to test without login,
```json
{
"debugNoLogin": true
}
```
should be set in `./config/api.json`
## Without docker
Make sure that you have installed postgres
```
npm i
node .\scripts\database.js | psql -U postgres -d ccims
npm start
```
## With docker
```bash
# for a clean build run this before docker compose:
rm tsconfig.tsbuildinfo
npm i
npm run database-file
docker-compose up
```
`./config/postgres.json` should look like this:
```json
{
"$schema": "./postgres.schema.json",
"user": "ccims-user",
"password": "ccims-password",
"database": "ccims",
"host": "db",
"port": 5432
}
```
Access the db with psql:
```bash
psql --username ccims-user --dbname ccims --host localhost --port 5433
# password is 'ccims-password'
```