Yet another go/ shortlink service.
Corpshort is a Rack application.
See config.ru for detailed configuration. The following environment variable is supported by the bundled config.ru.
SECRET_KEY_BASE
(required)CORPSHORT_BASE_URL
(optional): Base URL to use in links (e.g. http://go.corp.example.com
)CORPSHORT_SHORT_BASE_URL
(optional): Alternative shorter base URL to present, used on texts (e.g. http://go
)CORPSHORT_BACKEND
= redis
: Use redis as a backend store
REDIS_URL
(optional)CORPSHORT_REDIS_PREFIX
(optional, default: corpshort:
)CORPSHORT_BACKEND
= dynamodb
: Use dynamodb as a backend store
CORPSHORT_DYNAMODB_REGION
CORPSHORT_DYNAMODB_TABLE
name
url-updated_at-index
:
url
(String)updated_at
(String)updated_at_partition-updated_at-index
:
updated_at_partition
(String)updated_at
(String){
"name": "Name",
"url": "https://example.org",
"updated_at": "2018-06-25T18:32:17Z",
"show_url": "https://localhost/Name+",
"link_url": "https://localhost/Name",
"short_link_url": "https://go/Name"
}
/+api/links
token
(optional){links: [""], next_token: ""}
)/+api/links
name
and url
/+api/links/*name
/+api/links/*name
/+api/urls
url
parameterAfter checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/sorah/corpshort.
The gem is available as open source under the terms of the MIT License.