https://github.com/evilfactorylabs/gow
URL shortener for evlfctry.pro
https://github.com/evilfactorylabs/gow
go golang reason reasonml url-shortener
Last synced: 9 days ago
JSON representation
URL shortener for evlfctry.pro
- Host: GitHub
- URL: https://github.com/evilfactorylabs/gow
- Owner: evilfactorylabs
- License: mit
- Created: 2020-02-12T10:51:15.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-01T08:42:33.000Z (over 4 years ago)
- Last Synced: 2023-03-08T20:22:56.086Z (almost 3 years ago)
- Topics: go, golang, reason, reasonml, url-shortener
- Language: Go
- Homepage: https://evlfctry.pro/docker
- Size: 274 KB
- Stars: 29
- Watchers: 4
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gow
> Simple URL shortener with simple analytics.

## Motivation
This program is powering our internal url shortener (evlfctry.pro) which is to
track link distribution without tracking any personal data.
## Technologies
- Go
- SQLite
- Reason React (Web)
## Goals
- Minimal dependencies
- Minimal memory footprint
- No personal data tracking
## Development
Make sure you have Go & SQLite installed (and its dependencies), if not, you know what's next.
- Build the application: `make`
- Run the server: `TOKEN= ./gow`
If you want to develop the web as well, you need to open a new terminal session and
run `npm run dev` in `web` directory.
## Environment variables
- `TOKEN` - Used for creating via REST_API, default: (empty)
- `HOST` - Helpful when you are using reverse proxy, default: `localhost`
- `PORT` - Helpful in case you don't use container technology, default: `3030`
- `SLACK_WEBHOOK` - (Optional) Slack Webhook URL to send incoming request to Slack, default: (empty)
For now (v0.2.0), authorization is done in Layer 7 (Load Balancer), but I will fix this.
## Deployment
There are 2 ways to run this program in Production.
### Quick way
- Pull the image: `docker pull evilfactorylabs/gow:`
- Run it: `docker run -d -e TOKEN="" -v ~/data:/app/data evilfactorylabs/gow:`
### As Binary
- Clone repo
- Build code: `make`
- Run program: `TOKEN= ./gow`
### As Docker Container
- Build image: `docker build -t . evilfactorylabs/gow:latest`
- Run image: `docker run -d -e TOKEN="" -v ~/data:/app/data evilfactorylabs/gow:`
## Roadmap
- [ ] v1.0.0 — stable basic functionality [api, web]
- [ ] v1.1.0 — show total hits on index & stats page [api, web]
- [ ] v1.2.0 — functionality to delete existing slug [api]
- [ ] v1.3.0 — authentication functionality, not rely on token (like now) [api, db]
- [ ] v1.4.0 — make migration easier and more reliable [db]
- [ ] v1.5.0 — fancy chart! [web]
## Maintainer(s)
- [Fariz, evilfactorylabs](mailto:fariz@evilfactory.id)
- [Ri7nz, evilfactorylabs](https://twitter.com/ri7nz)
## License
(c) 2020 evilfactorylabs, under MIT License.