In a new terminal tab:
- Install the back-end requirements in the environment of your choice:
$ cd /path/to/repo/tutorial-drafts/articles/django-vue-graphql/source_code/backend/
$ python3 -m pip install -r requirements.txt
- Create the initial Django database by running migrations:
$ python manage.py migrate
- Create a Django superuser:
$ python manage.py createsuperuser
- Run the Django project (by default on port 8000):
$ python manage.py runserver
In a new terminal tab:
- Install the front-end requirements:
$ cd /path/to/repo/tutorial-drafts/articles/django-vue-graphql/source_code/frontend/
$ npm install
- Run the Vue project (by default on port 8080):
$ npm run serve
- Visit the Django admin
- Log in using the superuser you created earlier
- Write a few posts, adding authors and tags as desired
- Make sure at least one post is
published
(or no posts will appear)
- Visit the blog homepage
- Browse the posts, tags, and authors
- Visit the GraphiQL interface
- View the Docs panel on the top right
- Create some queries—the available information should auto-populate!