Skip to content

Getting started with Flamingo

Hello World Example

If you want to experience a very simple and basic Flamingo application then follow these steps:

  1. Make sure you have Go >= 1.13 installed: https://golang.org/doc/install

  2. Get the Flamingo "example-helloworld". git clone git@github.com:i-love-flamingo/example-helloworld.git

  3. Run the application cd example-helloworld Your entry point is main.go, this is where the application is started. During the first run, go will download all dependencies. Flamingo uses go modules for this.

    Run go run main.go to see a list of possible commands. Run go run main.go serve to start the Flamingo server and open http://localhost:3322/

Flamingo from scratch

If you want to start a new project then follow these steps:

  1. Initialize project
mkdir hello-flamingo && cd hello-flamingo
go mod init flamingo.me/hello-flamingo
  1. Create initial main.go file
package main

import (
    "flamingo.me/flamingo/v3"
)

func main() {
    flamingo.App(nil)
}
  1. Run the code, the first time this will download and pin all necessary dependencies
go run main.go

How to continue

  • Start with Hello World Tutorial to build your "Hello World" example step by step and learn some of Flamingo's features.
  • Continue with Hello Flamingo Carotene to learn the features of the pug template engine and the flamingo-carotene frontend pipeline.
  • Continue with the Open Weather Example to learn how to build an application that connects to an external service step by step.

Read through the Manuals