Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fn-devx/go-crud-audit-log
audit logger # 2024
https://github.com/fn-devx/go-crud-audit-log
go go-learning postgres shell
Last synced: about 1 month ago
JSON representation
audit logger # 2024
- Host: GitHub
- URL: https://github.com/fn-devx/go-crud-audit-log
- Owner: fn-devX
- Created: 2024-09-14T13:26:34.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T13:32:59.000Z (4 months ago)
- Last Synced: 2024-11-14T18:50:37.993Z (about 2 months ago)
- Topics: go, go-learning, postgres, shell
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Logging Service for requests
### Stack
- go 1.21
- postgres### Launch
To run, you need to specify environment variables, for example, in a .env file.```
export DB_URI=mongodb://localhost:27017
export DB_USERNAME=admin
export DB_PASSWORD=zmrtestit
export DB_DATABASE=auditexport SERVER_PORT=9000
```Build and run
```
source .env && go build -o app cmd/main.go && ./app
```For MongoDB, you can use Docker
```
docker run --rm -d --name audit-log-mongo \
> -e MONGO_INITDB_ROOT_USERNAME=admin \
> -e MONGO_INITDB_ROOT_PASSWORD=zmrtestit \
> -p 27017:27017 mongo:latest
```