This is a application build with golang, jwt, gorm, postgresql, mysql
-
Running in local:
- In a root Wordir (have main.go)
go run main.go
-
Build with Docker-Compose:
-
- Have Docker, Docker-Compose installed:
-
- If you have PostgreSQL installed on your local machine:
- Stop the PostgreSQL service:
-
Linux
systemctl stop postgresql
-
Windows
- First, you need to find the PostgreSQL database directory, it can be something like "C:\Program Files\PostgreSQL\10.4\data" . Then open Command Prompt and execute this command:
pg_ctl -D "C:\Program Files\PostgreSQL\10.4\data" stop
-
MacOS
- If you installed PostgreSQL via Homebrew:
pg_ctl -D /usr/local/var/postgres stop
-
-
- Buid it Or Update, Run:
-
sudo bash ./build-docker.sh
-
- Buid it Or Update, Run:
-
Note: At Default:
- we use port 8080 for api
- we use port 5432 for database