This application was built using ReactJS + TypeScript for the frontend, Flask a python based back-end library for the backend, and the SQLAlchemy to store a local version of a database to the application.
This application will allow you to do the following:
- Add tasks to your todo list
- Delete tasks from your todo list upon the click of a button
- Reset all of your todos so you can start a fresh todo list
In order to run and use this application you need to take the following steps (please follow the steps in order):
#General Seteup
- Clone this repository by typing "git clone https://github.com/nxdavar/todo-flask.git" in your terminal
- Cd into the project folder's root
- In the root of the folder run the command npm install
- Once all necessary packages have been installed, your application will be up and running at http://localhost:3000 (In the terminal you can command + click this link and it will open it up in your browswer if it does not do so automatically)
- Open another terminal window
- Cd into the project folder's root
- Cd into the backend folder
- Create a virtual environment by typing in "python -m (name of your virtual env)"
- Activate your virtual environment by typing in source "(name of your virtual env)/bin/activate" (Use ls to check if there is a folder called your virtual env's name after creating it in Step 4)
- Install necessary requirements by typing in pip install -r requirements.txt
- Start the backend server by typing in npm run start-backend (this not the application you will be interacting with, the application you will be interacting with is the frontend application located at http://localhost:3000)
You might have to restart the frontend in order for the app to work as expected. If you are curious and want to view updates to the backend, in another window navigate to http://localhost:5000/todos