@nx-golang/gin
v0.7.0
Published
nx-golang/gin is an opinionated gin setup which uses [Uber fx](https://github.com/uber-go/fx) and [Swaggo](https://github.com/swaggo/swag)
Downloads
20
Readme
nx-golang/gin is an opinionated gin setup which uses Uber fx and Swaggo
- It makes golang/gin code possible in nx repo.
- It makes your controllers/middlewares/routes/servies/repositories code consistent.
- It uses dependency injection.
- It supports auto generated OpenAPI doc from source.
Setting Up @nx-golang/gin
To create a new workspace with @nx-golang/gin, run the following command:
npx create-nx-workspace my-workspace
Yarn users can use the following command instead:
yarn create nx-workspace my-workspace
To add the @nx-golang/gin plugin to an existing workspace, run one the following commands:
npm install -D @nx-golang/gin
yarn add -D @nx-golang/gin
Create Applications
You can add a new @nx-golang/gin application with the following command:
nx g @nx-golang/gin:app gin-app
Create Controllers/Middlewares/Services (TBD)
Using @nx-golang/gin
Build
You can build an application with the following command:
nx build gin-app
Serve (TBD)
You can serve an application with the following command:
nx serve gin-app
Debugging (TBD)
Lint
You can lint an application with the following command:
nx lint gin-app
Unit Test
You can run unit test for an application with the following command:
nx test gin-app
You can run unit test for a library with the following command:
nx test gin-lib
More Documentation
TBD