0.0.4 • Published 4 years ago
tks-app-backend v0.0.4
- Template: https://github.com/leovolpatto/graphql-api-template
- Repo original: https://github.com/leovolpatto/graphql-api
tks-app-api
API Architecture overview:
The API is composed by 3 main layers:
Datasources - Communication with other APIs - Database access
- Raw data focused cache (IE. APIs resposes, persisted dabatase entities)
Modules (and resolvers) - This is where the GraphQl API Modules are. They have their single Schema and Resolvers.
- Resolvers should have an Interface defining their contracts in order to easily write resolvers to any platform
- Processed information focused cache (IE. APIs Auth information)
Application Layer - An NodeJS with Express Framework hosts the entire application giving it hability to append to it any REST resources needed as /healthcheck, etc.
Quick documentation
https://docs.google.com/document/d/1FXeZKy_q2pmIU9C-U5QhT1Vpm7F0QDxT3dlyaI7NhrE/edit?usp=sharing
Requirements:
- NodeJS >= 12.14.0
- Npm >= 6.13.4
Yarn >= 1.21.1
Setup
- Run
$ yarn install
- Edit the required environment variables in .env
Run
$ yarn build
Running
Run
$ node ./dist/index.js
Debugging
- Run
$ yarn debug
- If you´re using VSCODE, then simply press F5 to attach it to the debugger socket.