Use this application to manage your company's employees, roles, and departments. Employee Manager uses a series of CLI prompts that will kick off queries to the MySQL database "employee_db" based on the user's input.
-
- View all employees.
-
- View all roles.
-
- View all departments.
-
- Add an employee.
-
- Add a role.
-
- Add a department.
-
- Update an employee's role.
-
- Update an employee's reporting manager.
-
- View employees by manager.
See Screenshots for examples.
- JavaScript
- MySQL & MySQL Workbench
- Node and npm
- Visual Studio Code
- cmder
-
- Start by entering the following in your terminal:
Git clone https://github.com/whackingMUFN/Employee_Manager.git
- Start by entering the following in your terminal:
-
- Change directory to
Employee_Manager
and enternpm install
into your terminal. This will install all package dependencies.
- Change directory to
-
- Add node_modules to .gitignore.
-
- Create a
config.js
file based on the template here. - If file
config.js
is created in another location other than the parent folder, remember to updateserver.js
const credentials = require('./config')
with the new relative path. - Replace
<ID>
in theuser
andpassword
fields inconfig.js
with the credential information for the database.
- Create a
-
- Copy Database and Table setup from
./db/scehma.sql
- Paste into MySQL Workbench and execute.
- Copy Database and Table setup from
-
- Copy table data from
./db/employeeSeed.sql
- Paste into MySQL and execute only the
INSERT INTO ... VALUES (...)
information code blocks for each table. This can be done by selecting/highlighting the desired code blocks and clicking the lightning bolt.
- Paste into MySQL and execute only the
- Copy table data from
- Start the application by running
npm start
This assignment was provided by Trilogy Education Services. Code was developed based on in class activities and lectures, MDN Reference Documents for JavaScript syntax, JSHint for JavaScript validation, mysqltutorial for reference documentation and examples, and various other online resources.
License MIT © 2020 Calvin Freese