Without writing any code, you can generate complete project code for a web service (gin). Server-side development can also be done with low-code

Introduces a new code generation tool, sponge, which seamlessly combines generated CRUD interface code with generated web service code (no need to add or change any code) and includes features such as paging conditional queries, caching etc.

github: GitHub - zhufuyi/sponge: sponge is a powerful code generation tool, a microservices framework based on gin and gRPC.

After installing sponge, open the UI by executing the command

sponge run

The web service code is mainly composed of gin, gorm, go-redis and other common libraries. It also contains swagger documentation, test code, code for common service governance functions, build deployment scripts and more.

Switch to the web directory and execute the command:

# Generate swagger documentation
make docs

# Compile and start the web service
make run

Open localhost:8080/swagger/index.html in your browser and you can add, delete,upate and query tables.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.