A backend server for managing a coffee shop application built with Node.js, Express, and MySQL. This server provides APIs for managing users, products, services, and blogs.
- User Authentication: Secure login with JWT.
- Product Management: CRUD operations for coffee shop products.
- Blog Management: Users can add, view, update, and delete blogs.
- Role-Based Access Control: Admin and user roles for specific API access.
- Backend: Node.js, Express.js
- Forntend: React.js, vite
- Database: MySQL
- Authentication: JWT
- Validation: express-validator
- Clone the repository:
git clone https://github.com/mobinsha/Coffee-Shop-Server.git cd Coffee-Shop-Server
- Install dependencies:
npm install
- Run the server:
Server will start on
npm start
http://localhost:3000
.
- POST /users/login: User login with JWT authentication.
- POST /users/register: Register a new user.
- **GET
- **GET
- **POST
- **PUT
- **DELETE
- **GET
- **GET
- **POST
- **PUT
- **DELETE
- **GET
- **GET
- **POST
- **PUT
- **DELETE
- **GET
- **GET
The database folder contains the SQL backup of the project. To use it:
- Import the
coffee-shop.sql
file into your MySQL database:mysql -u [username] -p [database_name] < coffee-shop.sql