https://github.com/luigisalcedo/auth-service-go
Authentication Microservice using Go with Gin, Golang-JWT, PostgreSQL and Gorm
https://github.com/luigisalcedo/auth-service-go
authentication gin-gonic go golang jwt postgresql
Last synced: 2 months ago
JSON representation
Authentication Microservice using Go with Gin, Golang-JWT, PostgreSQL and Gorm
- Host: GitHub
- URL: https://github.com/luigisalcedo/auth-service-go
- Owner: LuigiSalcedo
- Created: 2025-01-04T18:02:25.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-11T20:06:56.000Z (over 1 year ago)
- Last Synced: 2025-07-20T11:49:11.506Z (11 months ago)
- Topics: authentication, gin-gonic, go, golang, jwt, postgresql
- Language: Go
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Authors
- César Luigi Salcedo: [@LuigiSalcedo](https://www.github.com/LuigiSalcedo)
## Deployment
To build server executable:
```bash
go build server.go
```
To run server:
```bash
./server beauty
```
If You want to chage the server port change the server port conts in server.go file and re-build the project.
## Environment Variables
You need **PostgreSQL** installed and running in your machine.
There are 3 environment variable that You need to set in the **.env** file at project root.
`DB_CONNECTION_STRING`: any type of PostgreSQL connection string. Example: postgresql://user:password@localhost:5432/example_db
`JWT_SECRET`: the secret to sing the tokens
`CORS_ORIGINS`: origins that are allowed to request (optional, default = *)