Quickstart: Deploy a Fiber App
This guide explains how to deploy a Fiber application to seenode. Fiber is an Express-inspired web framework built on top of Fasthttp, the fastest HTTP engine for Go.
Deploy a Fiber Template
Section titled “Deploy a Fiber Template”Get started in seconds by deploying our pre-configured Fiber template. This example is ready to deploy and reflects the structure discussed in this guide.
Fiber Template
Deploy a minimal Fiber application designed for zero-configuration deployment.Deploying an Existing Fiber Project
Section titled “Deploying an Existing Fiber Project”Follow these steps to prepare and deploy your Fiber project.
-
Prepare Your Project for Production
Your project structure should be ready for deployment.
Project Structure
A minimal Fiber project contains a
main.go
entry point and ago.mod
file.Directoryyour-fiber-project/
- main.go // The application entry point
- go.mod
- go.sum
Dependencies
Make sure your
go.mod
listsgofiber/fiber
as a dependency.go.mod module your-fiber-projectgo 1.21require github.com/gofiber/fiber/v2 v2.52.0Run
to create yourgo mod tidygo.sum
file.Alternative Setup
If you want to start from scratch, you can set up a new Fiber project with these commands:
Terminal window # Install Go (if you haven't yet)sudo apt update && sudo apt install golang-go# Create a new projectmkdir your-fiber-projectcd your-fiber-projectgo mod init your-fiber-projectgo get github.com/gofiber/fiber/v2Terminal window # Install Go using Homebrew (if you haven't yet)brew install go# Create a new projectmkdir your-fiber-projectcd your-fiber-projectgo mod init your-fiber-projectgo get github.com/gofiber/fiber/v2Terminal window # Install Go from https://golang.org/dl/# Download and run the installer, then restart your terminal# Create a new projectmkdir your-fiber-projectcd your-fiber-projectgo mod init your-fiber-projectgo get github.com/gofiber/fiber/v2Application Code
Your
main.go
file should create a Fiber server that listens on a port defined by an environment variable. This allows seenode to correctly route traffic to your application.main.go package mainimport "github.com/gofiber/fiber/v2"func main() {app := fiber.New()app.Get("/", func(c *fiber.Ctx) error {return c.SendString("Hello, Welcome to seenode 👋")})app.Listen(":80")}Testing Locally
You can test your application locally by running:
go run main.go -
Deploy on seenode
Follow these steps to deploy your Fiber application:
- First, create a new Web Service from the seenode Dashboard and connect your Fiber project’s Git repository.
- Configure your build and start commands. seenode will attempt to detect these automatically.
- Build Command: go build -o app main.go
- Start Command: ./app
- Build Command:
- Choose your preferred instance size and create your service.
- Watch your deployment progress in real-time through the Logs tab.
- Once complete, your Fiber application will be accessible via your service’s URL.
Next Steps
Section titled “Next Steps”Now that your Fiber application is deployed, here are some things you might want to do next:
Set up a Custom Domain (Coming Soon)
Configure a custom domain to point to your new web service.Connect to a Database
Instantly scaffold and connect PostgreSQL and MySQL databases