Follow these steps to create a new project based on the Microbus
framework.
Make a directory to hold your projects files.
mkdir mysolution
Init the Go project with the name of the package of your project, for example github.com/mycompany/mysolution
.
cd mysolution
go mod init github.com/mycompany/mysolution
Add Microbus
’s code generator to go.mod
using:
go get github.com/microbus-io/fabric/codegen
Create doc.go
in the root of the project.
package root
//go:generate go run github.com/microbus-io/fabric/codegen
Use the code generator to create the project structure.
go generate
mysolution/
├── .vscode/
│ └── launch.json # VSCode launch file
└── main/
├── config.yaml # Configuration file
├── env.yaml # Environment settings
└── main.go # Main application
Fetch the dependencies.
go mod tidy
Create a microservice, rinse and repeat.