Skip to content

Getting started with Flamingo

Hello World Example

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

  1. Make sure you have go > 1.11 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 entrypoint 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 with an empty project then follow this 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 features.
  • Continue with Hello Flamingo Carotine to learn the features of the pug template engine and the flamingo-carotene frontend pipeline.
  • Continue with Open Weather Example to learn how to build a application that connects to an external service step by step.

Read through the Manuals