Giter Club home page Giter Club logo

employee_tracker_be's Introduction

Employee_Tracker_BE

Inquirer & SQL queries Backend

Description:

  • This program is designed to build a employee database using mysql && the functionality of modifying the database in the terminal window using inquirer.js.
  • This project was completed based on the Node.js, inquirer.js and mysql database, and can be run once installed.
  • I have learned the ways to work at the server-side of javaScript database development, so that the front-end can retrieve the data by a set of query statements.

Built By:

  • JavaScript
  • Node.js
  • npm (inquirer.js)
  • npm (mysql2)
  • npm (console.table)

Wall-Around Installation Video

How to Install:

  • Open Gitbash/terminal, navigate towards your project location from your root by using "cd ./ project location"
  • Choose a clone option from the "Employee_Tracker_BE" repository (either HTTPS or SSH should work)
  • In Gitbash, type "git clone HTTPS or SSH"
  • Once the clone is successful, navigate to the root directory of this repo.
  • Enter npm init into the terminal.
  • Enter npm install inquirer into the terminal to install the inquirer.js package, Enter npm install console.table --save into the terminal to install the console.table package and enter npm install mysql2 to install the mysql2 package and you are good to go!

How to initialize the database:

  1. In your command window/gitbash shell, enter mysql -u root -p and then type your password of your sql account. image

  2. Now in your sql command window, type in source db/db.sql to create a new database called employee_tracker_db

    image

  3. type in source db/schema.sql to feed the relational tables into the database. image

  4. type in source db/seeds.sql to seed some customized data into the tables.

    image

  5. Type in SELECT * FROM employee Your initial-stage employee table should look like: image

How to Use:

  1. Navigate (cd) to the root directory in your terminal. Enter node index.js, if the question prompts started to appear, you can proceed. image

  2. After each task, you can answer 'Y' or 'y' to the followUp question to return to the main menu or say 'N' or 'n' to exit. image\


©️2022 Kevin (Haoyu) Fang

employee_tracker_be's People

Contributors

hfang821 avatar

Stargazers

 avatar

Watchers

 avatar

employee_tracker_be's Issues

Bug/updateRole

Bug:

1. Need to find a way to pass employee id into the dbMethods function.

2. The employee.map() function is currently having issues.

Feature/Inquirer Prompt Users

Use the npm inquirer package to prompt users in the command window to:

  1. View employees
  2. View departments
  3. View roles
  4. Add an Employee
  5. Add a department
  6. Add a role
  7. Update an employee role

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.