Installation

Local Development

One of the advantages of Confetti is that it is 'Developer friendly'. That starts with the installation of the framework. There are 3 easy ways to get Go and Confetti working:

Standard

Or you can download and install only Go and Confetti on your computer.

  1. Download Confetti template code from GitHubopen in new window
  2. Go to golang.orgopen in new window and follow the instructions.
  3. In your terminal, go to the place where you placed the Confetti code and run go run main.go in your terminal.
  4. The homepage is now available at http://localhost:8080/open in new window and API endpoint /ping is available at http://localhost:8080/api/pingopen in new window.

With every adjustment you have to cancel the command and run it again.

IDE Goland

You can also use the Go integration in your favorite editor. Here is a step-by-step plan for Goland:

  1. Download Confetti template code from GitHubopen in new window
  2. Complete the steps on Goland's websiteopen in new window, but use the code downloaded in step 1.
  3. The homepage is now available at http://localhost/open in new window and API endpoint /ping is available at http://localhost/api/pingopen in new window.

You can set a shortcut to rebuild after every modification.

Docker

The easiest way to set up Confetti is with Docker. It automatically detects changes, and you get a MySQL database and a Redis instance (without additional configuration).

  1. Download and start Dockeropen in new window.
  2. Download Confetti code from GitHubopen in new window.
  3. Open the folder with the code in your terminal and make sure Docker is running.
  4. Create your .env file by copying .env.example: cp .env.example .env
  5. Then run docker-compose up --build in your terminal to start confetti. The first time it takes a while for everything to be downloaded.
  6. After that, the homepage is available at http://localhost/open in new window and API endpoint /ping is available at http://localhost/api/pingopen in new window.

Update Modules

If you are using a new version of Confetti or other modules, you can run go get -u all to download the correct modules.

Contributors: Reindert Vetter, Vaggelis Yfantis