FAQs
Answers to the most common questions about building with Nimbus.
What Go version is required?
Nimbus requires Go 1.26 or later. This is the minimum version specified in the framework's go.mod. We recommend always using the latest stable Go release for security patches and performance improvements.
Can I use a different ORM instead of GORM?
Yes. While Nimbus ships with GORM integration via the database package, the framework does not force you to use it. You can use any Go database library — sqlx, ent, sqlc, or plain database/sql. Simply import your preferred library, initialize it in main.go, and pass the connection to your controllers however you like (struct field, service provider, or global).
How do I add custom middleware?
Middleware in Nimbus has the signature func(HandlerFunc) HandlerFunc. Create a function that wraps the next handler, apply it globally with app.Router.Use() or to a group with group.Use():
func TimingMiddleware() router.Middleware {
return func(next router.HandlerFunc) router.HandlerFunc {
return func(c *http.Context) error {
start := time.Now()
err := next(c)
log.Printf("request took %v", time.Since(start))
return err
}
}
}
// Register globally
app.Router.Use(TimingMiddleware())
Is Nimbus production-ready?
Nimbus is under active development. The core features — routing, middleware, ORM, views, auth, caching, and the CLI — are functional and tested. However, as with any young framework, you should evaluate it against your requirements. The underlying libraries (Chi, GORM) are battle-tested and widely used in production Go applications.
How does hot reload work?
When you run nimbus serve, the CLI watches your project directory for file changes (Go files, .nimbus templates, .env). When a change is detected, the running process is stopped, the app is recompiled, and the server restarts automatically. This happens in a few hundred milliseconds for most projects.
Can I use React, Vue, or other frontend frameworks?
Absolutely. The .nimbus template engine is designed for server-rendered HTML, but nothing prevents you from building a JSON API with Nimbus and consuming it from a React, Vue, Svelte, or any other frontend. Two common approaches:
- API-only mode — Skip views entirely. Define routes that return JSON via
c.JSON(). Serve your SPA from a CDN or thepublic/directory. - Hybrid — Use
.nimbustemplates for server-rendered pages and mount a frontend framework on specific pages by including its bundle in the layout.
What databases are supported?
Through GORM, Nimbus supports SQLite, PostgreSQL, MySQL, and SQL Server out of the box. Set the DB_DRIVER and DB_DSN in your .env file:
# SQLite
DB_DRIVER=sqlite
DB_DSN=database.sqlite
# PostgreSQL
DB_DRIVER=postgres
DB_DSN=host=localhost user=app password=secret dbname=myapp port=5432 sslmode=disable
# MySQL
DB_DRIVER=mysql
DB_DSN=user:password@tcp(127.0.0.1:3306)/myapp?parseTime=true
How do I serve static files?
Place files in the public/ directory. Nimbus can serve them directly, or you can let a reverse proxy like Nginx handle static assets for better performance in production.
Where can I get help?
Open an issue on the GitHub repository, check existing discussions, or read through the source code. Contributions and questions are welcome.