2023-12-07 10:41:51 +01:00
2023-12-07 10:41:51 +01:00
2023-12-05 19:46:03 +01:00
2023-12-05 19:46:03 +01:00
2023-12-07 10:41:51 +01:00
2023-11-30 11:17:44 +01:00
2023-11-29 22:11:47 +01:00
2023-11-30 11:51:56 +01:00
2023-12-05 10:43:23 +01:00
2023-12-05 10:43:23 +01:00
2023-12-05 15:46:41 +01:00
2023-11-29 10:29:36 +01:00
2023-12-07 10:41:51 +01:00
2023-12-07 10:41:51 +01:00
2023-12-06 12:44:03 +01:00
2023-12-05 19:46:03 +01:00

boilerplate-backend

nodejs npm docker eslint apollo-server graphql type-graphql

The IT4C Boilerplate for an apollo express backends.

Requirements & Technology

To be able to build this project you need nodejs, npm and optional docker.

The project sets up an apollo server. It uses type-graphql.

Commands

The following commands are available:

Command Description
npm install Project setup
npm run build Compiles and minifies for production
npm run start Runs productions server
Develop
npm run dev Compiles and hot-reloads for development
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:

docker compose up

Docker can be run in production mode:

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.

npm run update -- -u
npm install

Endpoints

The following endpoints are provided given the right command is executed or all three if docker compose is used:

Endpoint Description
http://localhost:4000/graphql GraphQL API
http://localhost:4000/playground GraphQL Playground

License

Apache 2.0

Description
Boilerplate for an apollo express backend
Readme Apache-2.0 1.3 MiB
Languages
TypeScript 57%
Dockerfile 43%