GithubHelp home page GithubHelp logo

trendingtechnology / urlshortener Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 732 KB

A simple URL shortener built with Flask - https://url.mikelowe.xyz/

License: MIT License

Python 41.05% HTML 20.89% Dockerfile 2.61% JavaScript 30.35% CSS 5.10%

urlshortener's Introduction

URL Shortener

Latest Release Build Status Coverage Status License

A simple URL shortener built with Flask and MongoDB. A deployed version can be viewed here.

Screenshot

Screenshot

Getting Started

With Docker

Prerequisites

Running

From your terminal/command prompt run:

docker-compose up

Then point your browser to http://127.0.0.1:5000/.

Without Docker

Installing Requirements

  1. (Optional) Install virtualenv and virtualenvwrapper and create a new environment.
  2. Run pip install -r requirements.txt.

Setting up MongoDB

You can either:

  • Install MongoDB locally by going here.

or:

Configuration

The following properties can be configured:

Name Purpose Default
DEBUG If debug mode is enabled. False
ENV Environment the app is running in. production
MONGODB_HOST The MongoDB host name. 127.0.0.1
SECRET_KEY A secret key used for security. default secret key
SERVER_NAME The host and port of the server. 127.0.0.1:5000
SESSION_COOKIE_DOMAIN The domain match rule that the session cookie will be valid for. 127.0.0.1:5000
SSL If the domain has a valid SSL certificate. True

To change these properties you can export them as environment variables or create a file instance/config.py (note that any environment variables take precedence).

URI style connections are also supported for connecting to MongoDB, just supply the URI as MONGODB_HOST (note that URI properties will take precedence).

Running

From your terminal/command prompt run:

./run.py

Then point your browser to http://127.0.0.1:5000/.

Technology Used

For those of you that are interested, the technology used in this project includes:

License

This project is licensed under the MIT License - see the LICENSE file for details.

urlshortener's People

Contributors

dependabot[bot] avatar renovate[bot] avatar vanillaslice avatar

Forkers

shaoweigege

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.