Url shortner service app in ruby with sinatra
- Ruby 2.5.0
git clone https://github.com/nidhinnambiar/url-shortner.git
Once the specified version of Ruby is installed with all its dependencies satisfied, run the following command from the root directory of the application.
gem install bundler
bundle install
cp config/database.yml.example config/database.yml
Update the credentials in database.yml with actual values.
Now you can create the database and perform migrations
rake db:create
rake db:migrate
Run the app with
rackup
or
thin start
Open Api end-point added for viewing url hits count and original url
<host>/api/:code