Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GraphQL API in Django

NotificationsYou must be signed in to change notification settings

codeanddraw/react-django-graphQL-postgres

Repository files navigation

GraphQL API in Django

  • Nisha Chaube

Method 1:

Setting up using Docker

Note: Below steps may take some time

docker-compose up -ddocker ps<!-- Login to react-django-graphql-postgres_core image -->docker exec -it ####### /bin/bashpython manage.py makemigrationspython manage.py migratepython manage.py loaddata ./Fixtures/initial_data.jsonDjango server url: http://127.0.0.1:8000/graphql/  <br />React frontend url: http://localhost:3000/

######################################################################Method 2:

Setting up Python environment

To get this project up and running you should start by having Python installed on your computer. It's advised you create a virtual environment to store your projects dependencies separately. You can install virtualenv with

pip install virtualenv

Clone or download this repository and open it in your editor of choice. In a terminal (mac/linux) or windows terminal, run the following command in the base directory of this project

python -m venv venv

That will create a new foldervenv in your project directory. Next activate it with this command on mac/linux:

source venv/bin/activate

Then install the project dependencies with

pip install -r requirements.txt

Now you can run the project with this command

python manage.py runserver

Setting up postgresql database

Install PostgresqlLinux

sudo apt-get install libpq-dev python-dev
sudo apt-get install postgresql postgresql-contrib

Setup Database and User in PostgreSQL

DATABASES= {"default": {"ENGINE":"django.db.backends.postgresql","NAME": "postgres,"USER":"postgres","PASSWORD":"postgres","HOST":"db"    }}
grant all privilegeson database postgres to postgres

Setting up Python environment


cd uinpm installnpm start

About

GraphQL API in Django

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp