This is a url shortening application. The API receives a url and returns a shortened version of the url, similar to Bit.ly and Google URL Shortener.
The building blocks are:
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
You need the following installed in your machine to be able to run the project:
These are instructions for setting up Diary API in development environment.
$ git clone https://github.com/ro6ley/midget.git midget_project
$ cd midget_project
$ pipenv install
$ cd client && npm install && cd ..
$ ./midget/manage.py makemigrations
$ ./midget/manage.py migrate
$ redis-server /usr/local/etc/redis.conf
$ ./midget/manage.py runserver
$ cd client && npm run serve
The front-end should now be running at http://localhost:8080/
.
The API will be running on http://localhost:8000/
Once up and running the API documentation is available at: http://localhost:8000/docs
The endpoints in summary:
Endpoint | Functionality |
---|---|
POST /api/links/ | Create a shortened URL |
GET /slug:link | Access the shortened URL |
GET /all | Get a list of all shortened URLs |
DELETE /slug:link | Delete the shortened URL |
To run the tests:
$ ./midget/manage.py test --settings=settings.testing
See also the list of contributors who participated in this project.
Author: ro6ley
Source Code: https://github.com/ro6ley/midget
#vue #vuejs #django