Skip to content

fabiohaifa/nodejs-chat-bot-stock-market

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat-Bot Stock Marcket NodeJS Challenge

This is a project only for challenge purpouses. Do not copy/paste it!

Installation

NodeJS v10.15.3:

apt-get update
apt-get install nodejs

Docker - run with elevated previleges:

apt-get update
apt-get install docker-ce docker-ce-cli containerd.io

For more information: https://docs.docker.com/engine/install/

MongoDB (Docker image):

docker pull mongo
docker run --name mongodb -d -p 27017:27017 mongo --noauth --bind_ip=0.0.0.0
docker start mongodb

MongoDB must be running and listening at localhost:27017

Install Project Dependencies:

npm install

Starting the server:

npm start

Usage

Right after the server started just open a browser tab and type the follow address:

http://localhost:3000/

Click on the 'start chat' link and you will be asked for authentication proccess.

For login into the system use one of credentials bellow:

Username: user1 
Password: 123

Username: user2 
Password: 321

Both users will be inserted into database after first time use of the app.

To use the bot services you will need send a message with the '/' as first character.

List of all commands avaliable for bot interaction:

/stock={CODE}

{CODE} is the stock market share code like: AMZN.US or AAPL.US

The bot will write the value of the stock market share after reading this information from an external tool. All bot responses will not be storage in the database.

Technologies

Docker & MongoDB

NoSQL Database to store users and messages running in a docker for easy cloud deploy

Docker

MongoDB

NodeJS Express

Framework to provide web structure to create a web-chat

NomeJS Express

Socket.IO

Socket.IO provide and fast and real-time bi-directional for chat communications

Socket.IO

Passport & BCrypt

Passport for authentication and BCrypt for hash encryption of user's password

Passport

BCrypt

License

Use only for challenges purpouses.

Author

Fabio Pirani de Padua

About

Chanllenge - NodeJS Chat-bot reponding stock market price

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published