/e-commerce-backend

Backend Service for my jewellery e-commerce

Primary LanguageJavaScript

e-commerce-backend

Backend Service for my jewellery e-commerce

Project Banner

Welcome to the Awesome Node.js Backend Project! This repository houses a powerful and well-structured Node.js backend application that will serve as the backbone for your next amazing web application. It provides a robust foundation for building scalable, efficient, and reliable server-side applications.

Features

  • Express.js: A fast, minimalist, and flexible web application framework that provides a great foundation for building APIs and web applications.
  • MongoDB: Utilize MongoDB, a popular NoSQL database, to store and manage your application's data efficiently.
  • Error Handling: Properly handle errors and exceptions to provide meaningful responses to clients.
  • RESTful API: Design and implement a clean and well-structured RESTful API for seamless integration with front-end applications.
  • Environment Variables: Manage sensitive data and configuration settings using environment variables.
  • Deployment: Deployed it on render.com. You can explore options for deploying your Node.js backend to production servers or cloud platforms.

Getting Started

To get started with the project, follow these steps:

  1. Prerequisites: Make sure you have Node.js and npm installed on your system.
  2. Clone the repository: git clone https://github.com/shridhar998/e-commerce-backend.git
  3. Install dependencies: npm install
  4. Setup Environment Variables: Create a .env file in the root directory and add the necessary environment variables like database connection URL, secret key, etc.
  5. Run the server: npm start
  6. Testing: Execute tests using npm test.
  7. API Documentation: Refer to the API documentation available at API Docs to understand available endpoints and request/response formats.

API Testing on Postman:

Here are few screenshots of api routes i tested on Postman

Creating a new product (POST request)

Screenshot (16)

Fetching all products (GET request)

Screenshot (17)

Fetching a product by its id (GET request)

Screenshot (18)

Updating a product by its id (PATCH request)

Screenshot (19)

Deleting a product by its id (DELETE request)

Screenshot (20)

Contributing

Contributions are always welcome! If you'd like to contribute to the project, please follow the guidelines.

Acknowledgments

Special thanks to the creators of the libraries and tools used in this project that make development in Node.js so enjoyable and productive. Specially localtunnel