This project is an E-commerce API developed using Node.js, Express.js, and MySQL. It is designed to provide a backend solution for e-commerce platforms, offering a range of features from product management to order processing.
- Node.js
- MySQL
- Clone the repository to your local machine.
- Install the necessary packages using npm:
npm install
- Set up your MySQL database and ensure it is running.
- Configure the database settings in the
config
directory.
- Start the server:
node server.js
- The API will be available at
http://localhost:[PORT]
, where[PORT]
is the port number specified in the server configuration.
config
: Contains configuration settings for the application, such as database configuration.controllers
: Holds the logic for handling requests and sending responses. Each controller typically corresponds to a specific functionality of the API.helpers
: Provides utility functions that support various operations within the application.middlewares
: Includes middleware functions for handling requests, such as authentication and error handling.models
: Contains data models representing the structure of the database tables and potentially methods for querying or manipulating data.routers
: Defines the routes for the API. Each route is linked to its corresponding controller.server.js
: The main entry point for the application. It initializes the Express server and sets up middleware and routes.
- Product Management: Create, read, update, and delete products.
- Order Processing: Handle customer orders and track order status.
- User Authentication: Register and authenticate users.
Feel free to customize and extend the project according to your requirements.
Contributions to the project are welcome. Please ensure to follow the project's coding standards and submit pull requests for any enhancements.