/orm-e-commerce-back-end

Object-Relational Mapping (ORM) Challenge: E-commerce Back End

Primary LanguageJavaScriptMIT LicenseMIT

Object-Relational Mapping (ORM) Challenge: E-commerce Back End

  1. Description.
  2. Web Address.
  3. Usage tips.
  4. Features.
  5. Credits.
  6. Licenses.
  7. Install Command.
  8. Test Command.
  9. Contributing.
  10. Questions.

For license description, click on the badge to get more information.

License

1. Description

This application is a backend application servicing front end routes and using MySQL database with Node.Js, Express, Sequelize and dotenv.

Major tech snapshot

tech

2. How to Get There

Open your favorite web browser and enter the following web address to access to the README.md

https://github.com/esroleo/orm-e-commerce-back-end

3. Usage Tips

For more information - Please visit the following videos on how the application works and some background information on the app build.

If you want to run locally preform the following:

This application is running under mysql as a local host, you can modify the .env file with your own user/password to start the application.

If you are still intersted in running the application you would need to do the following:

  • run mysql terminal at project source location source db/schema.sql
  • npm i
  • npm run seed
  • npm start
  • use Insomnia (use videos and sample snapshots using Insomnia for Product model for your reference).

Part 1 - Creat, Sync and Seed - Once you open the video, re-change the quality to 1080p to make sure is not blurry.

https://drive.google.com/file/d/1z2XNqvDgF5Hh081kiiVU7YK6Me6oVYZg/view

Part 2 - Functionality - Once you open the video, re-change the quality to 1080p to make sure is not blurry.

https://drive.google.com/file/d/1Zyrp9xGGHMUgavJ0maclr-Fy3khwZhAI/view

Part 3 - Functionality #2 - Once you open the video, re-change the quality to 1080p to make sure is not blurry.

https://drive.google.com/file/d/1rrdGjDfXXBAhJCULTVtFThZ9iggzaNVh/view

4. Features

GET (Select All), GET by id (Select by ID), POST (Create), PUT (Update), DELETE (Destroy)

*** Functionality of one route as example: ***

GET all products.

step

GET product by ID.

step

POST/Create product.

step

PUT/Update product by ID.

step

GET product by ID after update.

step

DELETE product by ID.

step

GET product after delete not found.

step

5. Credits

Thank you Esteban Romero for working on this project.

6. Licenses

mit

7. Install Command

Database dependency is --> mysql Ver 8.0.23 for Win64 on x86_64

npm install command will install javascript dependencies

npm i

8. Test Command

You can sync model changes by changing force: false to true. This will also remove all data and start fresh. Once you have synced, stop the applicatio by using ctrl + c on your keyboard and change the force:true to false and restart the application.

Once the above is done, you can now use Insomnia to do the routes commands.

@ server.js line 14

// sync sequelize models to the database, then turn on the server sequelize.sync({ force: false }).then(() => { app.listen(PORT, () => console.log('Now listening')); });

9. Contributing

Please email Esteban Romero.

10. Questions

Please reach out to me

GitHub Url: https://github.com/esroleo

Email address: esroleo@gmail.com