JokTec is a powerful and easy-to-use library designed to approach microservice architecture. It offers a skeleton that can be extendable and is compatible with NestJS framework. Whether you're a beginner or an experienced developer, JokTec can help you to organize and architect microservice simply and quickly.
- node >= 14.x.x
- yarn >= 1.22.x - Prefer recommended than npm
$ npm install -g yarn
- lerna (global) - Optional on Unix, required on Window
$ npm install -g lerna
- nx (global) - Optional on Unix, required on Window
$ npm install -g nx
- @nestjs/cli (global) - Optional on Unix, required on Window
$ npm install -g @nestjs/cli
Stand on the root project and run:
$ yarn install
# OR
$ yarn
It will be install all dependencies for all packages/ or apps/
# Build all packages in project (recommended for first installation)
$ yarn build
# Build a single package
$ yarn build --scope @joktec/core
# Build multiple packages
$ yarn build --scope @joktec/core --scope @joktec/graphql
P/S:
- After build core package, it will be link to other service automatically. So you don't need to copy build dir (/dist) to node_modules any more
- If don't have any changes in packages, and retry build again will be read from cached.
$ yarn dev --scope @joktec/example-gateway
$ yarn dev --scope @joktec/example-micro
If conflict port, goto each package will have config.yml file. Edit port in it and re-run
gateway:
port: 9010
micro:
port: 8010
P/S: This only affect on your local, don't impact to deployment
TBD
Contributions to @joktec/core
are welcome. If you would like to contribute, please fork the repository, make your changes, and submit a pull request.
Please make sure to update tests as appropriate.
If you encounter any issues while using all those libraries, please feel free to create an issue on our GitHub repository.
All libraries is licensed under the MIT License.