Skip to documentation
Go

Framework guides

Go

Create a standard-library HTTP service.

On this page

Choose your starting point

Before you start

Node.js 20.19 or newer to run Forjex, plus Go 1.22 or newer.

Create your project from a folder where you keep your work. Forjex creates a new subfolder and refuses to overwrite an existing one. No GitHub or Vercel account is required to create and run the starter.

Create your Go project

1

Generate the starter

Run this command from your terminal. It downloads and runs the Forjex CLI.

pnpm dlx forjex create my-go-app --template go

Forjex creates the files. Install the language tools listed above, then follow the commands in the next step.

The package-manager buttons select how you run Forjex. Node starter dependencies are installed with npm by the CLI. After creation, interactive mode offers to continue into GitHub, optional CI/CD, and deployment. Choose No or use --no-setup to finish locally.

2

Run your application

cd my-go-app
go run .

Open http://localhost:8080 for a JSON response. The /health endpoint returns a health check.

3

Make your first change

Edit main.go. Run the application again to see your changes.

Use the entry point and test starter as a starting point for your own application.

4

Run the checks

go test ./...
go build ./...

Run this before sharing your work. A successful local build or test does not deploy the application.

What gets created

  • Standard-library net/http server on port 8080
  • JSON responses and a /health endpoint
  • A starter HTTP handler test
  • go.mod with no third-party framework dependency
Project structure
├── .gitignore
├── go.mod
├── main_test.go
├── main.go
└── README.md

This is the complete default local file tree before installing dependencies. It includes the README and a language-specific .gitignore. The HTTP service uses the standard library, not Fiber.

Already have a project?

Skip the create command. Open your existing Go project folder and run:

npx forjex forge

Choose Use the existing project in this directory. The CLI uses your local application files for repository setup; it does not replace them with a starter. Review existing workflows and configuration before enabling generation.

Follow the existing-project guide →

Connect GitHub and ship

Creation offers to continue into GitHub, optional CI/CD, and deployment. To continue later, run npx forjex forge from the generated project folder and choose the existing-project path. You can create a GitHub repository, add CI/CD, and push your code.

Use a host that supports your language and runtime. These backend starters do not include a Vercel deployment setup.

Prefer a visual setup? The browser wizard also offers this framework.