django-elm-auth-with-jwt is an example of how you can implement JSON Web Token (JWT) authentication using django & django rest framework as a backend and elm as a frontend.
Clone the repository:
➜ git clone https://github.com/apirobot/django-elm-auth-with-jwt.gitCreate and activate virtualenv:
➜ virtualenv -p python3 .venv
➜ source .venv/bin/activateInstall dependencies:
../backend ➜ pip install -r requirements.txt
../frontend ➜ elm-package installRun migrations:
../backend ➜ python manage.py makemigrations
../backend ➜ python manage.py migrateStart up backend:
../backend ➜ python manage.py runserverStart up frontend using elm-live:
../frontend ➜ elm-live --port=3000 --output=elm.js src/Main.elm --pushstate --open --debugWe are done.
- Frontend: http://localhost:3000/
- Backend: http://localhost:8000/