Code Monkey home page Code Monkey logo

e-commerce-backend's Introduction

E-Commerce Backend

MIT License

Table of Contents

Description

This project creates the back-end code for an e-commerce site. This application uses Express.js API and Sequelize to interact with a MySQL database. The database is created using mySQL with models and associations. The API Routes are created using RESTful CRUD methods displayed in my walk through videos. Since there is no front-end code, the application was tested using Insomnia.

Built With

  • HTML
  • CSS
  • JavaScript
  • MySQL
  • Sequelize
  • dotenv (to create the environmental variables)
  • Insomnia (for testing)

Installation Instructions

Node.js Installation

Make sure that you have Node.js installed on your computer by entering node -v in the command line. If successful, the command prompt will return a version number. If not, try reinstalling Node.js by following this link: https://nodejs.org/en/ and clicking on the LTS version. If you are on Windows, make sure to look for the section that says Download for Windows (x64). If you are using macOS, make sure to look for the section that says Download for MacOS (x64)

Clone the Code

Once Node.js is downloaded, click on the green code button and copy the link to this repository. Then open up your favorite code editor and open the terminal. In the terminal use cd to go to the root directory you want this repository to be cloned to. Finally, in the terminal, type git clone <file link> to clone this repository to your directory.

npm Package Installations

You must also install the Express.js, Sequelize, and MySQL2 npm packages to run the server. Since these are npm packages instead of being built directly into node.js, you must type npm i into the command line to allow the npm packages to be installed.

Usage Instructions

To use this application follow the steps below.

  1. To connect to the MySQL database, run mySQL -u root -p in the command line and enter your MySQL password.

  2. Run source db/schema.sql in the MySQL command line to populate the database and then type quit to exit MySQL.

  3. Run npm run seed in the command line to seed the file. If the file was properly seeded, you should see something similar to the screenshot below.

![Seeded Code]

  1. Connect to the server by typing npm start in the command line. If the server connected successfully, you should see something similar to the screenshot below.

![Start Server]

  1. To test the application, follow the Screencastify videos below. For more information on Insomnia, follow this link: https://docs.insomnia.rest/.

Screencastify

  • For a walkthrough of MySQL and how to seed and start the server, watch this walkthrough:

  • For a walkthrough of how the routes work using Insomnia, watch this walkthrough:

License

Permission to use this application is granted under the MIT license. Click on the link for more information: MIT License Information

How To Contribution

To contribute, refer to the installation instructions above.

Tests

There is no command for running these tests. To test the application, download insomnia and watch the Screencastify videos in the usage section to seed the data, start the application and test the routes in Insomnia. For more information on Insomnia, follow this link: https://docs.insomnia.rest/.

Contact Me

GitHub Link: (https://github.com/mmorua)
Email Address: [email protected]

e-commerce-backend's People

Contributors

mmorua avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.