Skip to content

Node Js Create a Docerized instance of this database. Write the SQL and a dockerfile to launch the DB, and create the tables required

Notifications You must be signed in to change notification settings

jhoncbernal/CodeTestCion

Repository files navigation

CodeTestCion

Context

  • Create a Docerized instance of this database. Write the SQL and a dockerfile to launch the DB, and create the tables required.

Write a node JS script that inserts 2 users into the database, and creates 2 messages between the users. Then query the database and retreive the information on the 2 users and their chat history. Log this data to the node console.

Related Links

Screenshots

PgAdmin Configuration

image

Node js log

image

DB data

  • image
  • image

Manual Testing Steps

  • Please Run the application with this command: docker-compose -f "docker-compose.yml" up -d --build

  • Go to http:https://localhost:8080/

  • Login with the credentials : email: [email protected] password: secret

  • Click on Add New Server and name it

  • Go to connection tab into the field host : your local ip or localhost, username: postgres and password : newPassword

  • Go to Databases, cion-db, Schemas, public, tables and there are 2 tables messages and users

  • Create 2 new queries:

    -SELECT message_id, from_user, to_user, date, body FROM public.messages;

    -SELECT user_id, display_name, email FROM public.users;

  • Also you can enter to the coinainer log cion-code-test and check the log

Readiness Checklist

  • Self-review code changes
  • Add or update tests
  • Ensure tests pass locally

About

Node Js Create a Docerized instance of this database. Write the SQL and a dockerfile to launch the DB, and create the tables required

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published