# Install Virtualenv
pip install virtualenv
# Create Environment
virtualenv venv
# Activate Environment
# 1. For Linux
source venv/source/activate
# 2. For Windows
source venv/Scripts/activate
# Install all the requirements
pip install -r requirements.txt
- Copy .env.sample file into same directory with name .env
- Update LaunchDarkly Keys in it.
LD_SDK_KEY=#
LD_FRONTEND_KEY=#
# Make sure nothing is running on port 5000
flask --app app.run --debug run
# Open browser and go to this url.
# http://localhost:5000
You can run this application by creating a image and then running it or Using pre-built image available on docker hub.
# Build Image
docker build . -t ld-demo
# Run container
docker run -p 5000:5000 ld-demo -e LD_FRONTEND_KEY="" -e LD_SDK_KEY=""# Get tag value from Github Releases.
docker run -p 5000:5000 ld-demo -e LD_FRONTEND_KEY="" -e LD_SDK_KEY="" sudhanshuinfracloud/launchdarkly-demo:latest
# Generate Migration
flask --app app.run db migrate -m "Message here"
# upgrade db
flask --app app.run db upgrade- Install Postman or Curl
curl --location --request POST 'localhost:5000/api/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"email" : "USER_EMAIL_ID",
"password" : "PASSWORD"
}'
/api/login- Generate Token for API calls./api/electronics- Return List of Electronics Products./api/fashion- Return List of Fashion Products./api/sale- Return List of Products on sale.
payment-gatewaytype - boolean.bell-icontype - boolean.ariticial-delaytype - booleanmax-like-allowedtype - numberadd-to-liketype - booleanredirect-to-saletype - booleandisable-registrationtype - booleanadd-field-totaltype - booleanset-logging-leveltype - numbersale-apitype - booleannav-darktype - booleansearch-featuretype - booleandark-theme-buttontype - boolean