import os

SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL']

ACCESS_TOKEN = os.environ['ACCESS_TOKEN']
PAGE_ID = os.environ['PAGE_ID']
APP_ID = os.environ['APP_ID']
VERIFY_TOKEN = os.environ['VERIFY_TOKEN']

import os

SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL', 'sqlite://')

ACCESS_TOKEN = os.environ.get('ACCESS_TOKEN')
PAGE_ID = os.environ.get('PAGE_ID')
APP_ID = os.environ.get('APP_ID')
VERIFY_TOKEN = os.environ.get('VERIFY_TOKEN')

Make server ignore missing environment variables
Make server ignore missing environment variables

This is by far the best solution for setup, CI and testing purposes.

  import os
  
- SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL']
+ SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL', 'sqlite://')
  
- ACCESS_TOKEN = os.environ['ACCESS_TOKEN']
+ ACCESS_TOKEN = os.environ.get('ACCESS_TOKEN')
- PAGE_ID = os.environ['PAGE_ID']
+ PAGE_ID = os.environ.get('PAGE_ID')
- APP_ID = os.environ['APP_ID']
+ APP_ID = os.environ.get('APP_ID')
- VERIFY_TOKEN = os.environ['VERIFY_TOKEN']
+ VERIFY_TOKEN = os.environ.get('VERIFY_TOKEN')
  
Make server ignore missing environment variables
## Code Before:
import os

SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL']

ACCESS_TOKEN = os.environ['ACCESS_TOKEN']
PAGE_ID = os.environ['PAGE_ID']
APP_ID = os.environ['APP_ID']
VERIFY_TOKEN = os.environ['VERIFY_TOKEN']

## Instruction:
Make server ignore missing environment variables
## Code After:
import os

SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL', 'sqlite://')

ACCESS_TOKEN = os.environ.get('ACCESS_TOKEN')
PAGE_ID = os.environ.get('PAGE_ID')
APP_ID = os.environ.get('APP_ID')
VERIFY_TOKEN = os.environ.get('VERIFY_TOKEN')
