Skip to content

Commit

Permalink
📖Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mihirh19 authored Mar 31, 2023
1 parent 32fdf7d commit 5a68fc5
Showing 1 changed file with 57 additions and 6 deletions.
63 changes: 57 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,73 @@
</a>
</p>

> This project is made with react,fastapi and mongodb (FARM stack)
`Todoist` is a full stack todo application built with FARM stack. FastAPI and MongoDB on the backend and ReactJS on the frontend.

### 🏠 [Homepage](https://github.com/mihirh19/todo_web_app/)

## Install
### How to run Locally?

```sh
## Backend

To run the backend, you need to have local mongodb instance running on you can setup a deployed instance using [MongoDB Atlas](https://www.mongodb.com/atlas/database).

### Setting up python environment

Run the following to create a virtual environment for the project. (Assuming you have python installed on local machine)

```bash
python -m virtualenv env
# OR
python -m venv env
#OR
python -m venv --system-site-packages env
#OR
python3 -m venv env
# if still doesn't work, google is your best friend!
```

If you're running the deployed instance, make sure to change the database connection string in `.env` file on the backend.

### Setting up `.env` file

To setup `.env` file on the backend, create a file named `.env` in `/backend/app`.
Add the following in the `.env` file.

```txt
JWT_SECRET_KEY=<RAMDOM_STRING>
JWT_REFRESH_SECRET_KEY=<RANDOM_SECTURE_LONG_STRING>
MONGO_CONNECTION_STRING=<MONGO_DB_CONNECTION_STRING>
# mongodb://localhost:27017/ <-- for local running instances
```

### Installing dependencies

Assuming you are in the base directory.

```bash
cd backend
pip install -r requirements.txt
```

## Usage
### Activating virtual environment

```sh
uvicorn backend.app.app:app --reload
```bash
# Windows
env/Scripts/activate
# MacOs + Linux
source env/bin/activate
```

### Running the backend

Assuming you are in the backend directory.

```bash
uvicorn app.app:app --reload
```

<hr>

## Author

👤 **Mihir Hadavani**
Expand Down

1 comment on commit 5a68fc5

@vercel
Copy link

@vercel vercel bot commented on 5a68fc5 Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

todo-web-app – ./

todo-web-app-git-main-mihir21.vercel.app
todo-web-app-mihir21.vercel.app
todo-web-app-jet.vercel.app

Please sign in to comment.