Learning golang with urlshortener
This is simple rest api using mux
and golang
. Give support few api endpoints
/shortener/urls
- List all url in database
/shortener/addUrl
- Add new url to database
- if shortenCode is not provided automatically generated.
/shortener/deleteUl/{shortenCode}
- delete existing url from database
/{shortenCode}
- Redirect based on shortenCode
to install this use golang's unoffical package manager dep
. All necessary depends files will come in vendor
directory
go get -u github.com/golang/dep/cmd/dep
dep ensure
go run main.go
In progress.
Test are written in BDD
using ginkgo
cd /test
ginkgo