Chat Application built using NestJS, PostgreSQL, Elasticsearch and ReactJS.
'register'
'login'
'logout'
'api/users'
'api/message'
'api/conversation/?with=${with}&page=${page}&limit=${limit}'
with
is the email of the user you are having the conversation withpage
is a pagination variable to indicate which page of conversation you want to retrievelimit
is a pagination variable to indicate how many conversations you want in each page to have'api/search/:index'
index
is the name of the Elasticsearch index'api/search/:index'
index
is the name of the Elasticsearch indexYou will need the following environment variables configured in order for compose to work. In your root directory create a .env
file with the following environment variables filled out.
NODE_ENV=production
JWT_EXPIRATION=604800
SERVER_PORT=8000
SOCKET_PORT=8001
SECRET='<string of your choice>'
ES_TIMEOUT=3000
# 192.168.99.100 for wsl users
ES_HOST=localhost
ES_PORT=9200
# 192.168.99.100 for wsl users
DB_HOST=localhost
DB_PORT=5432
# 192.168.99.100 for wsl users
DOCKER_IP=localhost
REACT_APP_REST_API_ENDPOINT=''
REACT_APP_SOCKET_ENDPOINT=''
REACT_APP_COOKIE_MAX_AGE=18000
REACT_APP_ITEMS_PER_PAGE=15
After you have created the .env open up a terminal and type in: $ make docker-up
Your application should be up on port 8000.
Author: tanvirtin
Source Code: https://github.com/tanvirtin/tinchat
#react #reactjs #javascript