A simple CLI program to enable easy access to an employee database. You can view departments, roles, and employees, and see associated info. You can even update an employee's role! Built in JavaScript using node.js, dotenv, inquirer, and mysql2 to access the mysql data storage.
The following instructions assume:
- You have mysql installed on your system correctly
- You know how to interact with it through the terminal
To install:
- Clone the repo or download the code.
- Open the terminal to run npm i to install the required packages.
- Copy the .env.EXAMPLE and rename to .env. Fill in your system's information.
- Start mysql shell in the terminal and run 4.1 "source db/schema.sql" 4.2 "source db/seeds.sql"
- "quit" to exit mysql shell
- Run "node index.js"
- Use the arrow keys to navigate the inquirer menu prompts. Enter information as requested.
- Voila.
See this walkthrough video: https://drive.google.com/file/d/1uBdz6P5k5uwXkqhcb6xkijOA_cCujvdJ/view
Here are some resources I found thoroughly useful in my creation of this program.
https://stackoverflow.com/questions/66626936/inquirer-js-populate-list-choices-from-sql-database
https://www.freecodecamp.org/news/javascript-check-if-undefined-how-to-test-for-undefined-in-js/
https://www.freecodecamp.org/news/synchronous-vs-asynchronous-in-javascript/
This README was generated by writeme-readme