An API that shortens long and ugly URLs.
This app was developed using ruby on rails with postgres database.
- Ruby: Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.
- Rails: Ruby on Rails, or Rails, is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller framework, providing default structures for a database, a web service, and web pages
- PostgreSQL: PostgreSQL is a powerful, open source object-relational database system (ORDBMS) that offers modern database features such as complex queries, foreign keys, etc.
-
POST: /users
Payloads:- username(string)
- password(string)
- email(string)
-
POST: /login
Payloads:- username(string)
- password(string)
-
GET: /user/total
Payloads:- No payload
-
GET: /url/total
Payloads:- No payload
-
POST: /urls
Payloads:- original_url(string) Headers:
- token(string) optional
-
GET: /user/urls
Headers:- token(string)
-
GET: /url/:id/locations
Headers:- token(string)
- Clone this repository to have the app on your machine with
git clone https://github.com/noordean/shotly.git - Change directory to the app's root with
cd shotly - Pull the develop branch with
git pull origin develop - Then run
bundle installto install the dependencies - Start the server with
rails s - Then using postman, you can consume
an_endpointwithhttp://localhost:3000/an_endpoint
- Fork this repository.
- Clone it.
- Create your feature branch on your local machine with
git checkout -b your-feature-branch - Push your changes to your remote branch with
git push origin your-feature-branch - Open a pull request against the develop branch, and describe how your feature works
Nurudeen Ibrahim