Table of Contents
To create a Restful API for the DahaClown website, I created this API using Nodejs, ExpressJs, and more. Using JWT to Authentication.
Send OTP by email to forget the password. Redis helps to cache OTP and not send more than 5 times within 5 minutes.
Use a queue to process purchase orders to avoid buying when there is only 1 product left that many people buy. In the future will move to microservices and use Kafka.
Frameworks/libraries used to bootstrap this project:
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
This is an example of how to list things you need to use the software and how to install them.
- npm
npm install npm@latest -g
Below is an example of how you can instruct your audience on installing and setting up your app.
- Get key MongoDB and Cloudinary
- Clone the repo
git clone https://github.com/haotamht/ShopApi.git
- Install NPM packages
npm install
- Enter your KEY in
.env
MONGO_URL=....
-
Call API from your website: EXAMPLES API : If use run in localhost
http://localhost:1209/api/info/orders http://localhost:1209/api/product/all ....
For more examples, please refer to the Documentation
- Create Rest Api
- Add Changelog
- Add More Api for Admin
- Build to Microservices
- Convert to NestJs
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Đăng Hào - Đăng Hào - [email protected]
Project Link: https://github.com/haotamht/ShopApi.git