To run the example as it is:
- First, you need to create a
.env
file in the same folder asmanage.py
and add a secret keySECRET_KEY = 'secret string key goes here'
- Then, run Django development server (
python manage.py runserver
)
If you make changes to C++ code (ie index.cc
):
- You need to re-build the
index.js
andindex.wasm
, and you may use the providedmakefile
for this and simply runmake index
which will re-build and also copy the output files intoDjangoWebAssembly/static/cpp
. If you build it with an alternative way, make sure that theindex.js
andindex.wasm
files underDjangoWebAssembly/static/cpp
are the latest. - The rest is the same as above (ie, you need to create a
.env
withSECRET_KEY
and run the development server)