Skip to content

strahinjapopovic/emp-data-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

emp-data-app

Employee Data Application

node version npm version nvm version inquirer version postgresql version

License: MIT

Twitter: stanpopovic Youtube: strahinja-popovic-ch

Employee data application with node.js v22.0.0, npm-v10.5.2, inquirer-v8.2.4 and postgresql-v8.11.5

Table of Content (TOC)

Description Info

Application emp-data-app or Employee Data Application is a small command line interface that faciliate connection between user inputs and database transactions. It provides some operations like CRUD on departments, roles and employees records.

GitHub Repository

GitHub

Application Logo

Git Bash Terminal screenshot.

Git Bash Terminal setting up origin main

Git Bash Terminal screenshot.

Installation Process

Because we need PostgreSQL database it should be installed at local machine drive and then loaded into npm node module packages. Installation process for postgresql we can find here PostgreSQL Databse Installation. During the installation process default port should be 5432. After database is installed localy npm pg packages should be loaded into node modules over cli terminal.

$ npm install pg

After packages are loaded database credentials should be populated into .env file like username, password, database host and database name. Check .env file for details. Also, there is a file ~data/transaction.sql that can be used to set database structure and to populate database with testing seeds. Check file transaction.sql. It can be runned as follows:

$ psql -U postgres # it should prompt ypur password for username postgres and insert password
Password for user postgres:
psql (16.2)
postgres=# \i ./data/transaction.sql
DROP DATABASE
CREATE DATABASE
You are now connected to database "emp_db" as user "postgres".
psql:data/transaction.sql:11: NOTICE:  table "department" does not exist, skipping
DROP TABLE
psql:data/transaction.sql:12: NOTICE:  table "role" does not exist, skipping
DROP TABLE
psql:data/transaction.sql:13: NOTICE:  table "employee" does not exist, skipping
CREATE TABLE
CREATE TABLE
INSERT 0 5
INSERT 0 8
INSERT 0 4
INSERT 0 8
emp_db=#

Usage Info

As a small application it can be helpful for testing and practising purpose but on the other side it has some atributes of serious programming application.

Contributing Guidelines

Currentlly, at this stage there is no contributors but for more information any enquiry can be reffered to Question and Contact section.

Test Instructions

Application runs by invoking command $ npm start at ~/emp-data-app/app> directory. Before running application, download compressed repo from githaub and installl packages globaly or at application root directory from the section Installation Process.

Demonstration on YouTube

Demonstration of the application can be visited below.

Node.js image as thumbnail for YouTube demo video.

License

Copyright © 2024, codexdev. Released under the MIT License.

Questions and Contacts

Questions about application can be reffered to the author's GitHub account or you can Contact Me directly over an email.

About

🌐Employee data application perfoms CRUD operations on PostgreSQL relational database related with employee data stored by using inquirer.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors