This is server-side application part of URL Shortener. Built using Golang, Fiber, and mongoDB.
Read more at api-spec.yaml
- MONGO_URI
- MONGO_MIN_POOL
- MONGO_MAX_POOL
- MONGO_MAX_CONN_IDLE
- MONGO_DATABASE
- URL_COLLECTION
- DOMAIN
For example, you can see .env.example
go mod download
go run main.go
go build main.go
- Build docker image
docker build -t url-server:1.0 .
- Run docker image
docker run -d --name url-server \ -p 5000:5000 \ -e MONGO_URI="mongodb://username:password@host:port" \ -e MONGO_MIN_POOL="10" \ -e MONGO_MAX_POOL="100" \ -e MONGO_MAX_CONN_IDLE="60" \ -e MONGO_DATABASE="urlShortener" \ -e URL_COLLECTION="urls" \ -e DOMAIN="http://localhost:5000" \ url-server:1.0
To learn more about this project, take a look at the following resources: