https://github.com/sempedia/programming_blog
Programming blog built using stacks: Python / Django / SQLite3 / GraphQL / ApolloClient / Vue JS / JavaScript
https://github.com/sempedia/programming_blog
Last synced: about 2 months ago
JSON representation
Programming blog built using stacks: Python / Django / SQLite3 / GraphQL / ApolloClient / Vue JS / JavaScript
- Host: GitHub
- URL: https://github.com/sempedia/programming_blog
- Owner: sempedia
- Created: 2024-04-18T10:03:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-18T10:12:18.000Z (over 1 year ago)
- Last Synced: 2025-01-22T09:49:30.864Z (9 months ago)
- Language: Python
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Build a Blog Using Django, Vue, and GraphQL
Install the project on your machine by following the steps outlined below.
## Setup
### Back End
Create a new terminal window, navigate into `back_end/`, create, activate a virtual environment, and install the necessary dependencies:
```sh
$ python -m venv venv
$ source venv/bin/activate
(venv) $ python -m pip install -r requirements.txt
```Then, create the initial Django database by running migrations:
```sh
$ python manage.py migrate
```Create a Django superuser:
```shell
$ python manage.py createsuperuser
```Run the Django project:
```sh
$ python manage.py runserver
```Before continuing, it's a good idea to create some users, profiles, and blog posts in the Django admin interface at `http://localhost:8000/admin`. You must use your superuser credentials to log in.
You can visit the GraphiQL platform `http://localhost:8000/graphql` to try out GraphQL queries.
### Front End
Open a new terminal and navigate into `front_end/`. Then, install the front-end requirements:
```sh
$ npm install --include dev
```Run the Vite development server:
```sh
$ npm run dev
```You must have the Django development server and the Vite server running at the same time.