A simple URL shortener written in Go with a React frontend and MongoDB database
- Shorten urls based on a user defined key
- Alias a key to point to another short url
- Open multiple pages at once by separating keys with a comma
- Alias a key to point to multiple other keys
- Opensearch integration to provide suggestions directly to browser
- Frontend to view most popular searches and search to find existing links
- Frontend to allow anyone to add and edit links
- Optional authentication using Azure AD
The app uses Makefiles. To build the docker image run make build
.
Before starting the app for the first time run make install
, then:
- To start the api run
make start-api
. - To start the frontend run
make start-frontend
# Enable Azure auth or not - if enabled, all other fields must be filled in
ENABLE_AUTH=false
# These come from the Azure AD dashboard
AD_TENANT_ID=
AD_CLIENT_ID=
AD_CLIENT_SECRET=
# Secret session token to store the user sessions
SESSION_TOKEN=
PORT=1323
DEBUG=false
JSON_LOGS=false
# List of addresses for mongo to connect to, e.g. localhost:27017,other
MONGO_ADDRESSES=localhost
MONGO_DATABASE=go
MONGO_USER=
MONGO_PASS=