Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pshreyam/url-shortener
🔗 Shorten long urls
https://github.com/pshreyam/url-shortener
flask oauth2 url-shortener
Last synced: 6 days ago
JSON representation
🔗 Shorten long urls
- Host: GitHub
- URL: https://github.com/pshreyam/url-shortener
- Owner: pshreyam
- Created: 2020-06-17T15:23:02.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-25T23:27:57.000Z (3 months ago)
- Last Synced: 2024-11-20T00:48:42.590Z (2 months ago)
- Topics: flask, oauth2, url-shortener
- Language: Python
- Homepage:
- Size: 89.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# URL Shortener
The purpose of URL shorteners is to shorten certain URLs in order to make it easier for the users. Typically URL shortener services are deployed using shorter domain names.
## Requirements and Dependencies
Requirements are listed in [requirements.txt](./requirements.txt).
```bash
python3 -m venv venv
source ./venv/bin/activate
pip3 install -r requirements.txt
```## Environment Variables
Set your environment variables replacing your values in place of `xyz`.
```bash
export SECRET_KEY=xyz
export GOOGLE_CLIENT_ID=xyz
export GOOGLE_CLIENT_SECRET=xyz
```You may also want to set some Flask environment variables.
```bash
export FLASK_APP=app
export FLASK_ENV=development
```Alternatively, you may use `.env` and `.flaskenv` files to store these environment variables respectively.
## Create Database
From the root of this project spawn up a python shell. Then type the following commands.
```bash
python3>>> from app import db
>>> db.create_all()
```## Run
```bash
flask run
```## Restricted URLs
Add more restricted URLs as you can!
PS: Add new URLs in new lines.