eduzgun / api-gateway-footy

An API gateway built in Golang, deployed to Google Cloud with Terraform

Home Page:https://terminal3.hashnode.dev/load-balanced-api-gateway-project-in-gcp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

api-gateway-footy

This is a project built with the GOTTH stack, which stands for Golang, Tailwind, Templ, and htmx. It's a web application that provides Premier League standings and fixtures.

Technologies Used

Golang: The backend of the application is written in Go using the Gin framework. Tailwind CSS: Tailwind CSS is a utility-first CSS framework. Templ: Templ is a template engine for Go that simplifies the process of generating HTML content. HTMX: HTMX is a library that allows for seamless interaction between the client and server using HTML attributes, enabling dynamic web applications without the need for complex JavaScript.

Getting Started

To clone this project and run it locally, follow these steps:

Clone the repository to your local machine: git clone https://github.com/eduzgun/api-gateway-footy.git Set up your environment variables by creating a .env file in the root directory. Here's an example .env file:

DB_HOST=localhost
DB_PORT=5432
DB_USER=yourusername
DB_PASSWORD=yourpassword
DB_NAME=yourdbname
DB_SSLMODE=disable
RAPID_API_KEY=yourapikey

Make sure to replace yourusername, yourpassword, yourdbname, and yourapikey with your actual database and RapidAPI credentials.

Run the following command to install dependencies and start the application: make all This command will generate necessary files, compile Tailwind CSS, and start the server.

For development, run make dev. This will use air to enable live reloading.

Makefile Commands

make all: Generates files, compiles CSS, and starts the server. make dev: Compiles CSS and starts the server with hot reloading using air. make run: Starts the server. make build: Builds the project. make css: Compiles Tailwind CSS. make css-watch: Compiles Tailwind CSS with watch mode.

About

An API gateway built in Golang, deployed to Google Cloud with Terraform

https://terminal3.hashnode.dev/load-balanced-api-gateway-project-in-gcp

License:Apache License 2.0


Languages

Language:Go 55.8%Language:CSS 26.7%Language:HCL 15.5%Language:Dockerfile 1.2%Language:Makefile 0.5%Language:JavaScript 0.3%