Skip to content

Flask Relocator is a reusable Flask application that dynamically informs users of a server’s new IP address or location, enabling seamless migrations without taking your application offline.

License

Notifications You must be signed in to change notification settings

andytubeee/flask-relocator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Relocator

Flask Relocator is a reusable Flask application designed to inform users of a server's new IP address or location. If you've migrated your server and don't want to take your application offline, Flask Relocator can dynamically inform users where to find the new site.

Features

  • Simple Integration: Easily integrate with any existing Flask application.
  • Dynamic Redirection: Customize the message and redirection URL based on your new server location.
  • Security Focused: Ensures that redirection notices are handled securely to prevent misuse.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

What things you need to install the software and how to install them:

pip install flask

Installing

A step-by-step series of examples that tell you how to get a development environment running:

  1. Clone the repository:
git clone https://github.com/andytubeee/flask-relocator.git
cd flask-relocator
  1. Setup virtualenv and activate it
python -m venv venv
source venv\bin\activate # or whatever OS you are using
  1. Install requirements:
pip install -r requirements.txt
  1. Run the application:
python app.py

Usage

First make a copy of .env.example to .env and populate the appropriate port number and new server location.

Add Flask Relocator in your app:

from relocator.relocator import relocator_blueprint
app = Flask(__name__)
app.register_blueprint(relocator_blueprint, url_prefix='/')

Contributing

Feel free to modify and contribute if you feel additional features are necessary

License

This project is licensed under the MIT License

Acknowledgments

About

Flask Relocator is a reusable Flask application that dynamically informs users of a server’s new IP address or location, enabling seamless migrations without taking your application offline.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published