- To start the
TMserver, change into theTMdirectory and run
python -m main- Add a new file to the
routesdirectory. The file should be named after the route. For example, the route/quizshould be namedquiz.py. - In the file, update the class name to match the route in PascalCase. For example, the route
/quizshould be namedQuiz. - Register the route by importing it into
routes/__init__.py. - Add the relevant html file to the
viewsdirectory. The file should be named after the route. For example, the route/quizshould be namedquiz.html. - Add the relevant static files to the
staticdirectory. Added static files can be accessed at/static/<filename>.
- Add a new file to the
apidirectory. The file should be named after the route. For example, the route/api/quizshould be namedquiz.py. - In the file, update the class name to match the route in PascalCase. For example, the route
/api/quizshould be namedQuiz. Change the argumentrouteto be the path of the directory. - Register the route by importing it into
routes/api/__init__.py.
See make file for options
To run in DEBUG mode, use DEBUG=1 ./main -p 8080 PYTHON