Skip to Content

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 serve

Run this command from the root directory of your Gofasta project.

This command takes no flags.

Examples

Start the server:

gofasta serve

How It Works

The gofasta serve command simply delegates to:

go run ./app/main serve

All 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 serve

Or use the provided Docker setup:

docker build -t myapp . docker run -p 8080:8080 myapp

Available Endpoints

Once the server is running, the following endpoints are available:

EndpointURL
REST APIhttp://localhost:8080/api/v1/
GraphQLhttp://localhost:8080/graphql
Health Checkhttp://localhost:8080/health
Swagger UIhttp://localhost:8080/swagger/index.html
Last updated on