Recipe App is an React-Flask app that allows users to register and login to view the Vegetarian Recipes and also create their own recipes on Create Recipe so other users can view the recipes created. It has ReactJs for the application with Flask as the server.
client
flask-server
virtual
Before getting started, ensure that you have the following dependencies installed on your system:
- Node.js
- npm (Node Package Manager)
- Python 3
- Flask
To get started with this project, follow the steps below:
- Clone this repository to your local machine using the following command:
git clone https://github.com/ruhi102/GroupRecipeApp
- Change into the project directory:
cd GroupRecipeApp
- Install the necessary dependencies for the React application by running the following command:
cd client
npm install
- Install Flask using pip, preferably in flask-server (install modules if terminal asks)
cd flask-server
pip install flask
- Install database PostgreSQL since we are using that for our application
sudo apt install postgresql
- Create database(optional)
- Make changes on database using this command
sudo -u postgres psql
- Since we have added the users using our own database create database signup in terminal
CREATE DATABASE signup on different terminal (optional)
- Alter the password for the databse as this 'SQLALCHEMY_DATABASE_URI' has a set password for the database on server.py
ALTER USER postgres WITH PASSWORD '456';
- Quit the database using this command on a different terminal
\q
- Start the Flask server by running the following command:
cd flask-server
python server.py
- Open another terminal window and navigate to the project directory. Start the React development server with the following command:
cd client
npm start
- The application should now be accessible in your browser at http://localhost:3000.