Quick Start
Build and run your first Lightning app in minutes
Routing
Learn URL parameters, wildcards, and HTTP methods
Middleware
Add logging, recovery, auth, and more to your handlers
Context API
Access request data and write responses with the Context object
Get started in 3 steps
1
Install Lightning
Add Lightning to your Go module with a single command.
2
Create your app
Instantiate the app, register a route, and start the server.
3
Test it
Run your app and send a request to confirm it’s working.
Explore the framework
Route Groups
Organize routes under shared prefixes with scoped middleware
Request Handling
Parse JSON bodies, query strings, headers, and cookies
Responses
Send JSON, XML, HTML, plain text, and file responses
Error Handling
Customize 404 and 500 handlers for your application
Static Files
Serve assets, images, and other static content
Configuration
Tune app name, JSON codecs, body size limits, and debug mode