- Table of Content
- Description Info
- GitHub Repository
- Installation Process
- Usage Info
- Contributing Guidelines
- Test Instructions
- Demonstration on YouTube
- License
- Questions and Contacts
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.
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 pgAfter 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=#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.
Currentlly, at this stage there is no contributors but for more information any enquiry can be reffered to Question and Contact section.
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.
Copyright © 2024, codexdev. Released under the MIT License.
Questions about application can be reffered to the author's GitHub account or you can Contact Me directly over an email.
