We intend to develop an e-commerce application with a REST architecture using the Echo framework. Echo is a Go web framework known for its exceptional performance, extensibility, and minimalistic design.
Before starting up this project, make sure you have the necessary dependencies installed in your machine.
-
Go - Go is an open source programming language that makes it simple to build secure, scalable systems.
-
Docker - Docker helps developers bring their ideas to life by conquering the complexity of app development.
-
PostgreSQL - The World's Most Advanced Open Source Relational Database
-
golangci-lint - is a fast Go linters runner. It runs linters in parallel, uses caching, supports yaml config, etc.
For running Postgres locally using Docker, run the following command:
docker run --name ecommerce-local-db -p 5432:5432 -e POSTGRES_PASSWORD=******** -d postgres
Execute in Postgres DB Shell
create database ecommerce;
Before launching the application, be certain to configure the necessary environment variables.
- JWT_SECRET
- DB_HOST
- DB_USERNAME
- DB_PASSWORD
- DB_NAME
- DB_PORT
Using Windows? Run the following command
make run
make build
make test
You can find the Postman Collection/HTTP Client for GoLand under postman_httpclient
directory.
You have the option to retrieve the image from DockerHub.
Proceed with the instructions to launch your application within a local Kubernetes cluster, such as Docker Desktop or Minikube.
Before proceeding, make sure to update the ConfigMap.