@nx-golang/gin
TypeScript icon, indicating that this package has built-in type declarations

0.7.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @nx-golang/gin

Weekly Downloads

68

Version

0.7.0

License

MIT

Unpacked Size

44.9 kB

Total Files

50

Last publish

Collaborators

  • cfanap