- To start the
TM
server, change into theTM
directory and run
python -m main
- Add a new file to the
routes
directory. The file should be named after the route. For example, the route/quiz
should be namedquiz.py
. - In the file, update the class name to match the route in PascalCase. For example, the route
/quiz
should be namedQuiz
. - Register the route by importing it into
routes/__init__.py
. - Add the relevant html file to the
views
directory. T 6D66 he file should be named after the route. For example, the route/quiz
should be namedquiz.html
. - Add the relevant static files to the
static
directory. Added static files can be accessed at/static/<filename>
.
- Add a new file to the
api
directory. The file should be named after the route. For example, the route/api/quiz
should be namedquiz.py
. - In the file, update the class name to match the route in PascalCase. For example, the route
/api/quiz
should be namedQuiz
. Change the argumentroute
to 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