The Webshop Demo is a sample e-commerce application that demonstrates the basic functionalities of an online store. It includes features for user authentication, product management, stock management, and configuration settings. The project is built using Express.js for the server, MySQL for the database, and JWT for authentication.
Clone the repository:
git clone https://github.com/nomadsdev/webshop_nodejs.git
cd webshop-demo
Install dependencies:
npm install
Create a .env
file:
Create a .env
file in the root directory and add the following environment variables:
KEY_AUTH=your_jwt_secret_key
Replace your_jwt_secret_key
with a strong secret key used for JWT authentication.
Set up the database:
db
folder or provided documentation.Start the server:
nodemon server
The application will start on http://localhost:3000.
POST /signin
: User login.POST /signup
: User registration.POST /admin/createproducts
: Create a new product.POST /admin/delete/:token
: Delete a product by its token.POST /admin/managestock
: Create or manage stock items.POST /admin/config
: Update application configuration.POST /generatecode
: Generate a new token code.POST /fillcode
: Fill in a token code to apply it.This project is licensed under the MIT License
For any questions or suggestions, please contact your email [email protected]