/SultidosLocales

Proyecto Back-End para e-commerce

Primary LanguageJavaScript

SultidosLocales

Description: This project is a back-end application built with JavaScript and MySQL for e-commerce. This e-commerce is for a local Peruvian-based store. It serves as the server-side component of a larger application, handling data storage, retrieval, and business logic.

Table of Contents Installation Configuration Database Setup Usage API Endpoints Dependencies Contributing License

Installation Clone the repository: bash Copy code git clone https://github.com/sophiawm/SultidosLocales.git

Install dependencies: bash Run through terminal

  1. npm init -y
  2. npm install express
  3. npm install express sequelize mysql2
  4. npm install nodemon -d
  5. npm install --save-d jest
  6. npm install --save-d supertest
  7. npm install cors

Configuration Update the package.json under "main": bash Copy code "type": "module",

Update the package.json in "scripts": bash Copy code "scripts": { "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watchAll --no-cache --detectOpenHandles", "dev": "nodemon app.js" },":

Database Setup Create a MySQL database for the project.

  1. Update the db.js file with your database credentials.
  2. Run database.sql through MySQLWorkbench to create the database in local storage.

Usage Run the application: bash Copy code npm run dev

The server will start on the specified port.

API Endpoints Document your API endpoints here, including request methods, route paths, and expected responses.

Example Endpoint: GET /products: Get a list of all products. POST /brands: Create a new brand.

Dependencies List all major dependencies and their versions used in the project. Node.js Express.js MySQL2 Cors Nodemon Sequileze Jest Supertest

Contributing If you would like to contribute to the project, follow these steps:

Fork the repository. Create a new branch for your feature or bug fix. Make your changes and commit them with descriptive messages. Push your changes to your fork. Submit a pull request to the main repository.

License This project is licensed under the ISC License.

Feel free to customize this README file based on your project's specific details and requirements.