书中 sayhello 项目如何启动呢


#1
(py3.6) bash-3.2$ flask run --port=5005
 * Serving Flask app "sayHello" (lazy loading)
 * Environment: development
 * Debug mode: on
 * Running on http://127.0.0.1:5005/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 292-346-354

然后我访问 http://127.0.0.1:5005/ 会提示我没有该数据库表

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: message [SQL: 'SELECT message.id AS message_id, message.name AS message_name, message.body AS message_body, message.timestamp AS message_timestamp \nFROM message ORDER BY message.timestamp DESC'] (Background on this error at: http://sqlalche.me/e/e3q8)

上面错误如何解决呢?谢谢,新手


#2

应该是需要先生成虚拟数据:

pipenv shell
flask forge

#3

第 7 章一开始(P195)就介绍了需要执行哪些命令来启动程序。