Follow the below setup to setup the backend locally. We are using npm
as the
package manager. So make sure you have node
and npm
installed in your
system.
If not installed, please read installation guide.
- Open your terminal and navigate to the
Milan
directory. - After that navigate to the
server
directory by typingcd server
. - Type
npm install
to install all the dependencies. - Once the installation is done, you can start the frontend server by typing
npm start
. - This should start the frontend server on
localhost:5000
.
- We are currently using
ExpressJS v4
along withMongoDB v6
as the backend framework. - We are using
Nodemon
for the hot reloading. - List of all the dependencies can be found in the
package.json
file.
We use a .env
file using the dotenv
package inside the root of the server
directory.
You must create a .env
file similar to .env.example file, remember that if you are using your own database the data might vary.
- Head on to Razorpay API reference and Sign Up to razor pay rembember you don't need to KYC.
- Login after Signing Up then you will see this interface, you can use the test mode.
- Then move to
Account & Settings
there you will get API keys option where you can generate the keys.
- Generate and copy the key and its secret and paste it to
RAZORPAY_KEY_ID
andRAZORPAY_KEY_SECRET
respectively and you are done setting up backend.
- Make sure to follow proper latest coding practices.
- Maintain a good readable folder structure
- Incase adding an API, do documment about it.
So now you have the the frontend up and running locally. Now you can start working on the issues. Now follow the below steps to setup the backend locally.