Setting Up the Python environment
A neat and organized python environment is reccomended for running spoo.me locally without any conflicts and ease of developments.
Prerequisites
-
Any code editor
Getting Started
-
Clone the repository
git clone https://github.com/spoo-me/url-shortener.git
-
Change directory to the cloned repository
cd url-shortener
-
Install
virtualenv
to create a virtual environment for this projectpip install virtualenv
-
Create a virtual environment
python -m venv venv
-
Activate the virtual environment
For windows use this code:
env/Scripts/activate
For mac use this code:
source venv/bin/activate
-
Install the required python packages
pip install -r requirements.txt
-
Check the installed packages
pip list
-
Create a
.env
file.touch .env
-
Fill in the environment variables in the
.env
file with the values generated beforeMONGODB_URI= CONTACT_WEBHOOK= URL_REPORT_WEBHOOK=
The
MONGODB_URI
,CONTACT_WEBHOOK
, andURL_REPORT_WEBHOOK
environment variables are sensitive and should not be shared with anyone. The values of these environment variables were generated in the previous steps. -
If you see all the required packages, congratulations 🎉 you are good to go! Follow the next steps to start the server