Please check the latest version installed:
-
Clone the Repository
Use Git to clone the repository to your local machine:
git clone https://github.com/priyans619/Transactions-api
-
Navigate to Project Directory
Change into the project directory:
cd backend
-
Install Dependecies
Install all packages using npm:
npm i
-
Set Up Environment Variable
Create a .env file in the root of project in (backend folder) and replace the monogoURL with the actual Database URL from atlas:
PORT=3030 mongoURL=mongodb+srv://<username>:<password>@<your-cluster>.mongodb.net/<dbname>?retryWrites=true&w=majority
-
Running the Server
Finally start the server by running:
npm run dev
The server will be running at http://localhost:3030
.
This project includes a Postman collection inside root folder for testing the API endpoints.
- Import the Collection in Postman
- Download the
Transaction-API.postman_collection.json
from this repository. - Open Postman and import the collection by clicking on "Import" and selecting the downloaded file.
- Select a request from the collection to send and get response.