This is a MongoDB connected server.
To set up this server project locally, follow these steps:
-
Create an account at MongoDB Atlas and follow the steps.
-
Deploy your cluster
-
Connect to your cluster by choosing the "Drivers" option (first option)
-
Copy the connection string provided for later use.
-
Creat a new folder. Inside the folder, create two new folders called 'client' and 'server'.
-
Inside the server file, clone the repository:
git clone https://github.com/aeishaharbee/cashflow-server.git -
Install the following dependencies:
npm install -
Create a .env file and add the following environment variables:
SECRET_KEY=your_secret_key MONGODB_URI=your_connection_string_from_MongoDB_Atlas -
Run the development servers:
npm start -
If you see below lines, you've successfully connected to the server.
Server is running on PORT: 5000
Database is connected
- Add a few categories value in your database before proceeding to clone the client side. (the categories that will appear when users use the web app, can't be changed by users)