Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nomekuma/e-commerce-backend
This repository contains the backend code for a Node.js Express API.
https://github.com/nomekuma/e-commerce-backend
backend cryptojs express expressjs jwt-authentication mongodb nodejs simple stripe stripe-api
Last synced: 11 days ago
JSON representation
This repository contains the backend code for a Node.js Express API.
- Host: GitHub
- URL: https://github.com/nomekuma/e-commerce-backend
- Owner: Nomekuma
- License: mit
- Created: 2023-07-06T10:58:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-18T03:38:25.000Z (over 1 year ago)
- Last Synced: 2024-11-08T07:11:40.555Z (2 months ago)
- Topics: backend, cryptojs, express, expressjs, jwt-authentication, mongodb, nodejs, simple, stripe, stripe-api
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Backend Node.js Express API
This repository contains the backend code for a Node.js Express API. It provides various routes and functionality for authentication, user management, product management, cart management, order management, and Stripe integration for checkout.
## Getting Started
To get started with this project, follow the instructions below.
### Prerequisites
- Node.js
- MongoDB### Installation
1. Clone the repository:
```bash
https://github.com/Nomekuma/Backend.git
```2. Install the dependencies:
```bash
cd Backend
npm install
```3. Set up the environment variables:
Create a `.env` file in the root directory and provide the following environment variables:
```
JWT_SEC=
PASS_SEC=
STRIPE_KEY=
PORT=
MONGO_URL=
```Make sure to replace ``, ``, ``, ``, and `` with your actual values.
### Usage
1. Start the server:
```bash
npm start
npm start dev to run with nodemon
```The server will start running on the specified port (`PORT`) or at default 5000.
2. Access the API routes:
- Authentication: `/api/auth`
- User management: `/api/users`
- Product management: `/api/products`
- Cart management: `/api/carts`
- Order management: `/api/orders`
- Checkout with Stripe: `/api/checkout`Use an API testing tool like [Postman](https://www.postman.com/) to interact with the API endpoints.
## Contributing
Contributions are welcome! If you find any issues or want to add new features, please open an issue or submit a pull request.
## License
This project is licensed under the [MIT License](LICENSE).
## Contact
If you have any questions or need further assistance, feel free to contact me at [email protected].