Skip to content
Snippets Groups Projects
Verified Commit da46cf11 authored by Sachin Kamath's avatar Sachin Kamath
Browse files

Add warning of unsafe work environment

parent 4c8f0f48
Branches develop
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
# app/__init__.py
import os
import sys
import time
from termcolor import colored
from flask_api import FlaskAPI
from flask_sqlalchemy import SQLAlchemy
......@@ -23,14 +26,14 @@ application.config['SECRET_KEY'] = 'blehblehbleh'
# Delay the application launch to get the user attention if running in
# testing mode
'''
if config_name != 'production':
if config_name != 'production' and not os.getenv('SKIP_COUNT'):
for x in range(0, 5):
sys.stdout.write(colored("\rYou are not running the server in production mode. " +
"App will run in {} seconds..".format(5-x), 'red'))
sys.stdout.flush()
time.sleep(1)
'''
print(colored("\n\nRunning app in {} mode..".format(config_name), 'yellow'))
# This disables the HTML API renderer for flask_api when called through
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment