
import os
from app import create_app
from flask.ext.script import Manager

application = create_app(os.getenv('FLASH_CONFIG') or 'development')
manager = Manager(application)

if __name__ == '__main__':
    manager.run()


import os
from app import create_app
from flask.ext.script import Manager, Server

application = create_app(os.getenv('FLASH_CONFIG') or 'development')
manager = Manager(application)
manager.add_command("runserver", Server(port=5001))

if __name__ == '__main__':
    manager.run()

Update to run on port 5001
Update to run on port 5001

For development we will want to run multiple apps, so they should each bind to a different port number.

  
  import os
  from app import create_app
- from flask.ext.script import Manager
+ from flask.ext.script import Manager, Server
  
  application = create_app(os.getenv('FLASH_CONFIG') or 'development')
  manager = Manager(application)
+ manager.add_command("runserver", Server(port=5001))
  
  if __name__ == '__main__':
      manager.run()
  
Update to run on port 5001
## Code Before:

import os
from app import create_app
from flask.ext.script import Manager

application = create_app(os.getenv('FLASH_CONFIG') or 'development')
manager = Manager(application)

if __name__ == '__main__':
    manager.run()

## Instruction:
Update to run on port 5001
## Code After:

import os
from app import create_app
from flask.ext.script import Manager, Server

application = create_app(os.getenv('FLASH_CONFIG') or 'development')
manager = Manager(application)
manager.add_command("runserver", Server(port=5001))

if __name__ == '__main__':
    manager.run()
