API Server
At the heart of LightningUserVault lies our robust API server, designed to offer seamless interactions and efficient data operations. We've harnessed the power of the Gin Web Framework to ensure swift performance, easy route registration, and a developer-friendly experience.
🛣️ Endpoints
Our framework supports the following user routes:
🛡️ Middlewares
To ensure smooth operations and enhanced security, we've integrated the following middlewares:
Metrics Monitoring: With the integration of
ginmetrics
, the server is equipped to monitor various metrics, providing insights into the application's performance and usage.CORS: The server uses the default CORS middleware to handle Cross-Origin Resource Sharing, ensuring that the API can be safely accessed from different origins, if configured.
Logging: The
gin.Logger()
middleware is employed to log every request to the server, capturing essential details like method, endpoint, status code, and latency.Panic Recovery: In the event of a panic, the
gin.Recovery()
middleware ensures that the server doesn't crash. Instead, it captures the panic and logs the error, allowing for smooth operations.API Documentation with Swagger: To make it easier for developers to understand, test, and interact with the API, Swagger documentation is set up. This interactive documentation provides details about each endpoint, expected payloads, responses, and more. You can access this documentation at the
/swagger/index.html
endpoint.
By integrating these middlewares, LigningUserVault ensures a robust, secure, and developer-friendly API server.
⚙️ Configuration
To customize the server's address, use the following command:
SERVER_ADDRESS: Address for your web server. Default:
0.0.0.0:8080
Last updated