Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/OpenSooq/Gloom
Gloom is a service to create short URLs that can be easily shared, tweeted, or emailed to friends.
https://github.com/OpenSooq/Gloom
mongodb shorten-urls
Last synced: about 2 months ago
JSON representation
Gloom is a service to create short URLs that can be easily shared, tweeted, or emailed to friends.
- Host: GitHub
- URL: https://github.com/OpenSooq/Gloom
- Owner: OpenSooq
- Created: 2017-06-08T18:03:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-11T15:16:39.000Z (over 6 years ago)
- Last Synced: 2024-07-31T14:08:53.593Z (5 months ago)
- Topics: mongodb, shorten-urls
- Language: JavaScript
- Size: 831 KB
- Stars: 7
- Watchers: 6
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-jordan - Gloom - Gloom is an opensource service that takes long URLs and squeezes them into fewer characters to make a link that is easier to share, tweet, or email to friends. (Python / Gists)
README
#
Gloom - Opensooq URL shortener
Gloom allows you to shorten URLs just as you would on your domain. Users can create these short links through the web interface For example, to shorten the URL http://www.google.com/, access UI admin:
Put your url then submit, you will see the shortner url.
or they can programatically create them through the Gloom API. With the Gloom API you can write applications that use simple HTTP methods to create short links from desktop, mobile, or web.
## API Doc
```
API : /shorten
Method : POST
Params : longURL
```For instance, you could issue the following curl command (POST request):
```
curl https://YourDomain/shorten \
-H 'Content-Type: application/json' \
-d '{"longUrl": "http://www.google.com/"}'
```
If successful, the response will look like:```javascript
{
shorten: "XXX",
link : "XXXXXXX"
}
```
-------------------------------------------------------------------------------------Links that users create through the Gloom can also open directly in your mobile applications that can handle those links. This automatic behavior provides the best possible experience to your app users who open your domain links, no matter what platform or device they are on.
This project running by [Python](https://www.python.org/) with [MongoDB](https://www.mongodb.com/) as a backend and done using [BottlePy](https://github.com/bottlepy/bottle) and [uPyApp](https://github.com/muayyad-alsadi/uPyApp)
## Installation
1. You need a domian to use it for shorting URL
2. Install MongoDB
3. You need `pymongo3````
virtualenv --system-site-packages virtualenv
source virtualenv/bin/activate
pip install bottle
```## Configuration
```
cp example/{uwsgi.ini,app.ini} ./
```Then edit those two files. For dev env use
```
cp example/uwsgi-dev.ini ./uwsgi.ini
```## Setup Database
```
./cli migrate
```