Skip to content

CRUD app for users to keep a digital diary using django and react.

Notifications You must be signed in to change notification settings

kkatodus/diary_app_react-django

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About this project

This project is a diary creation application using django as a backend with a psql database and a react frontend. Its main purpose was for me to educate myself on restful api calls and UI development in react.

To allow easier sharing of this project, I have containerized the backend and db of this project using docker.

You can look at a quick walk through of this project here

Getting Started

Start the backend

First, to get the backend of this project started, cd into the root directory of this project and run the following command:

docker-compose up --build db backend

Then log into the backend docker container and run the two commands below:

python manage.py makemigrations api
python manage.py migrate api

This should initiate your database with the models we are using.

(Optionally you can create a superuser to log into the admin site of django. To do this, run the command below in the backend docker container)

python manage.py createsuperuser

Now the backend should be ready to accept connections from the react frontend

Start the frontend

I personally prefer to not use docker to start the frontend because it doesn't give me the hot reload react has. So just cd into the frontend and start the frontend normally with the following two commands.

npm install
npm start

This should start your react frontend at port 3000

About

CRUD app for users to keep a digital diary using django and react.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published