dasisyouyu / nuxt-django

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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


Languages

Language:Python 46.2%Language:Shell 21.7%Language:Vue 19.3%Language:JavaScript 12.2%Language:CSS 0.5%