/nuxt-django

Sample application for @nuxtjs/auth with Django Rest Framework(DRF).

Primary LanguagePython

Nuxt Auth with Django Rest Framework

Sample application for @nuxtjs/auth with Django Rest Framework(DRF).
Do not use for production environments.

Overview

db -> port: 3306
nuxt -> port:3000
django -> port: 8000
nginx -> port:80 
  /admin,api,static -> proxy to django
  / -> proxy to nuxt

API endpoint

  • login(create token): /api/auth/token/create/ (with username, password)
  • logout: /api/auth/token/destroy/
  • get user property: /api/auth/me/

*generated by djoser

How to use

git clone git@github.com:charly24/nuxt-django.git
cd nuxt-django/
docker-compose up -d

docker-compose run django pipenv run ./sample/manage.py migrate

docker-compose run django pipenv run ./sample/manage.py createsuperuser