Giter Club home page Giter Club logo

repairshop-express-django-mysql's Introduction

repairshop-express-django-mysql

Web application that calculates the length of service for cars in a repair shop. Separate servers made with Node/Express and Python/Django.

Setup MySQL database

  • install MySQL
  • open a terminal window (command line) and run mysql.server start to start MySQL server
  • run mysql --local-infile -u root -p and enter your password to connect to MySQL (by default the password is empty, just hit enter)
  • open the data.sql file with a code/text editor and modify the absolute path (on line 14) to match the location of the repairs.csv file
  • select all, copy, paste the code (SQL statements) in the terminal, and run
    • the first SQL statements will load data from the repairs.csv file and create the repairshop database and repairs table
    • the last 2 SQL statements will create new tables (repairs1 and repairs2) from which we will query for specific records

Run the Node/Express server with MySQL

  • open a new terminal window/tab, navigate to the root directory of this repo, run npm i to install all dependencies
  • run npm test to run (Mocha/Chai) unit tests
    • these tests check the calculations and confirm the records
  • run npm run serve to run the server
  • open a new terminal window/tab, navigate to the root directory, and run npm start to run the command line application
    • the repairshop results will be displayed in the command line
    • the mechanics are ranked based on their expected length of repair based on the national average (ratio)

Run the Python/Django server with MySQL (Python 3.5.2/Django 1.11.1)

  • open a new terminal window/tab, navigate to the /repairshop directory, and run python manage.py runserver to run the server
    • the repairshop results will be displayed in the command line (same results generated as the Node/Express server)
    • the mechanics are ranked based on their expected length of repair based on the national average (ratio)

repairshop-express-django-mysql's People

Contributors

pengjoshua avatar

Watchers

 avatar  avatar  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.