gofasta serve
Starts the HTTP server by delegating to go run ./app/main serve. Unlike gofasta dev, this command does not include hot reload or file watching.
Usage
gofasta serveRun this command from the root directory of your Gofasta project.
This command takes no flags.
Examples
Start the server:
gofasta serveHow It Works
The gofasta serve command simply delegates to:
go run ./app/main serveAll server configuration (port, host, environment, etc.) is controlled through config.yaml and environment variables, not through CLI flags.
Production Deployment
For production, you typically build the binary first and then run it:
go build -o server ./app/main
./server serveOr use the provided Docker setup:
docker build -t myapp .
docker run -p 8080:8080 myappAvailable Endpoints
Once the server is running, the following endpoints are available:
| Endpoint | URL |
|---|---|
| REST API | http://localhost:8080/api/v1/ |
| GraphQL | http://localhost:8080/graphql |
| Health Check | http://localhost:8080/health |
| Swagger UI | http://localhost:8080/swagger/index.html |
Related
- gofasta dev — start the development server with hot reload
- gofasta migrate — run migrations before starting the server
- gofasta seed — seed the database before starting
Last updated on