Follow these steps to set up the project on your local machine:
- Clone the Repository:
git clone https://github.com/yourusername/CRUD-APP-1.git
- Install Dependencies: Navigate to the project directory and install both frontend and backend dependencies:
cd movie-app-CRUD -> cd movies-interface -> npm install
cd ../backend -> npm install
The project includes exported MongoDB collections in the data
directory. These exports contain the necessary data to run the application.
-
Make sure you have MongoDB installed and running locally.
-
Open your terminal and navigate to the
bin
directory of your MongoDB installation, typically located atC:\Program Files\MongoDB\Server\<version>\bin
. -
Use the following command to import the collections from your remote MongoDB instance:
mongorestore --uri "mongodb+srv://admin:RnGj0FHQWVFA11cp@cluster0.0fmqc9v.mongodb.net/moviesdbms" --nsInclude "movies.*" --nsInclude "users.*" --dir "C:\Users\kappal\Documents\CRUD APP 1\data"
- Replace
"mongodb+srv://admin:RnGj0FHQWVFA11cp@cluster0.0fmqc9v.mongodb.net/moviesdbms"
with your actual MongoDB URI. - Make sure to include all the collections you want to import in the
--nsInclude
flags. - Adjust the
--dir
flag to point to the correct folder where the data exports are stored.
- Replace
-
The command will import the specified collections into your local MongoDB instance.
Start both the frontend and backend servers:
Login
Signup
All Movies
Add new movies
Update existing movies