mirror of
https://github.com/IT4Change/boilerplate-backend.git
synced 2025-12-13 10:25:49 +00:00
update README
This commit is contained in:
parent
2d1191c511
commit
1fada0abc0
60
README.md
60
README.md
@ -2,6 +2,10 @@
|
|||||||
[![nodejs][badge-nodejs-img]][badge-nodejs-href]
|
[![nodejs][badge-nodejs-img]][badge-nodejs-href]
|
||||||
[![npm][badge-npm-img]][badge-npm-href]
|
[![npm][badge-npm-img]][badge-npm-href]
|
||||||
[![docker][badge-docker-img]][badge-docker-href]
|
[![docker][badge-docker-img]][badge-docker-href]
|
||||||
|
[![eslint][badge-eslint-img]][badge-eslint-href]
|
||||||
|
[![apollo-server][badge-apollo-img]][badge-apollo-href]
|
||||||
|
[![graphql][badge-graphql-img]][badge-graphql-href]
|
||||||
|
[![type-graphql][badge-type-graphql-img]][badge-type-graphql-href]
|
||||||
|
|
||||||
The IT4C Boilerplate for an apollo express backends.
|
The IT4C Boilerplate for an apollo express backends.
|
||||||
|
|
||||||
@ -15,14 +19,42 @@ The project sets up an apollo express server.
|
|||||||
|
|
||||||
The following commands are available:
|
The following commands are available:
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
|----------------------------|------------------------------------------|
|
|----------------------------|-------------------------------------------------|
|
||||||
| **Develop** | |
|
| `npm install` | Project setup |
|
||||||
| `npm run dev` | Compiles and hot-reloads for development |
|
| `npm run build` | Compiles and minifies for production |
|
||||||
| **Test** | |
|
| `npm run start` | Runs productions server |
|
||||||
| `npm run test:lint` | Run all linters |
|
| **Develop** | |
|
||||||
| `npm run test:lint:eslint` | Run linter eslint |
|
| `npm run dev` | Compiles and hot-reloads for development |
|
||||||
| `npm run test:lint:remark` | Run linter remark |
|
| **Test** | |
|
||||||
|
| `npm run test:lint` | Run all linters |
|
||||||
|
| `npm run test:lint:eslint` | Run linter eslint |
|
||||||
|
| `npm run test:lint:remark` | Run linter remark |
|
||||||
|
| `npm run test:unit` | Run all unit tests and generate coverage report |
|
||||||
|
| `npm test` | Run all tests & linters |
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
Docker can be run in development mode utilizing `docker-compose.overwrite.yml`:
|
||||||
|
```bash
|
||||||
|
docker compose up
|
||||||
|
```
|
||||||
|
|
||||||
|
Docker can be run in production mode:
|
||||||
|
```bash
|
||||||
|
docker compose -f docker-compose.yml up
|
||||||
|
```
|
||||||
|
|
||||||
|
### Update
|
||||||
|
|
||||||
|
You can get a list of packes to update by running `npm run update`.
|
||||||
|
|
||||||
|
Appending `-u ` will also update the packages in the `package.json`. You have to run `npm install` again after.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run update -- -u
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
## Endpoints
|
## Endpoints
|
||||||
|
|
||||||
@ -46,3 +78,15 @@ The following endpoints are provided given the right command is executed or all
|
|||||||
|
|
||||||
[badge-docker-img]: https://img.shields.io/badge/docker-latest-blue
|
[badge-docker-img]: https://img.shields.io/badge/docker-latest-blue
|
||||||
[badge-docker-href]: https://www.docker.com/
|
[badge-docker-href]: https://www.docker.com/
|
||||||
|
|
||||||
|
[badge-eslint-img]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2FIT4Change%2Fboilerplate-backend%2Fmaster%2Fpackage.json&query=devDependencies.eslint&label=eslint&color=yellow
|
||||||
|
[badge-eslint-href]: https://eslint.org/
|
||||||
|
|
||||||
|
[badge-apollo-img]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2FIT4Change%2Fboilerplate-backend%2Fmaster%2Fpackage.json&query=dependencies.apollo-server-express&label=eslint&color=yellow
|
||||||
|
[badge-apollo-href]: https://github.com/apollographql/apollo-server#readme
|
||||||
|
|
||||||
|
[badge-graphql-img]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2FIT4Change%2Fboilerplate-backend%2Fmaster%2Fpackage.json&query=dependencies.graphql&label=eslint&color=yellow
|
||||||
|
[badge-graphql-href]: https://graphql.org/
|
||||||
|
|
||||||
|
[badge-type-graphql-img]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2FIT4Change%2Fboilerplate-backend%2Fmaster%2Fpackage.json&query=dependencies.type-graphql&label=eslint&color=yellow
|
||||||
|
[badge-type-graphql-href]: https://typegraphql.com/
|
||||||
|
|||||||
@ -18,7 +18,6 @@ services:
|
|||||||
# bind the local folder to the docker to allow live reload
|
# bind the local folder to the docker to allow live reload
|
||||||
- ./:/server
|
- ./:/server
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
backend_node_modules:
|
backend_node_modules:
|
||||||
documentation_node_modules:
|
documentation_node_modules:
|
||||||
|
|||||||
@ -30,4 +30,4 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
external-net:
|
external-net:
|
||||||
internal-net:
|
internal-net:
|
||||||
internal: true
|
internal: true
|
||||||
|
|||||||
@ -22,7 +22,8 @@
|
|||||||
"test:lint:eslint": "eslint --ext .ts,.tsx,.js,.jsx,.json,.yml,.yaml --max-warnings 0 --ignore-path .gitignore .",
|
"test:lint:eslint": "eslint --ext .ts,.tsx,.js,.jsx,.json,.yml,.yaml --max-warnings 0 --ignore-path .gitignore .",
|
||||||
"test:lint:remark": "remark . --quiet --frail",
|
"test:lint:remark": "remark . --quiet --frail",
|
||||||
"test:unit": "TZ=UTC jest --runInBand --forceExit --detectOpenHandles",
|
"test:unit": "TZ=UTC jest --runInBand --forceExit --detectOpenHandles",
|
||||||
"test": "npm run test:lint && npm run test:unit"
|
"test": "npm run test:lint && npm run test:unit",
|
||||||
|
"update": "npx npm-check-update"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"apollo-server-express": "^3.13.0",
|
"apollo-server-express": "^3.13.0",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user