Skip to content

Realtime chat application with TypeScript, PostgreSQL, Redis, JWT & WebSockets

Notifications You must be signed in to change notification settings

nikitkrsk/Chat-App

Repository files navigation

To start the project

git clone project
npm i 
npm run start

To clear DB

sudo -u postgres psql somedatabase
DROP TABLE chat_user, "group", group_users_chat_user, session, message, migrations, role, status CASCADE;

To Create Migration in TYPEORM

npm run typeorm:cli -- migration:create -n MigrationName
npm run typeorm:cli -- migration:create -n ChatUser

POSTGRESQL INSTALLATION

sudo apt install postgresql postgresql-contrib

sudo -u postgres createuser <username>
sudo -u postgres createuser newuser

sudo -u postgres createdb <dbname>
sudo -u postgres createdb somedatabase

sudo -u postgres psql
alter user <username> with encrypted password '<password>';
alter user newuser with encrypted password 'secret123';
ALTER ROLE <username> SUPERUSER;
ALTER ROLE newuser SUPERUSER;


// change the password of the user
ALTER USER user_name WITH PASSWORD 'new_password';
ALTER USER newuser WITH PASSWORD 'secret123';

Useful links

About

Realtime chat application with TypeScript, PostgreSQL, Redis, JWT & WebSockets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published