Skip to content

cotts/chat-api-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chat-api-bot

Chat API that can integrate with Bot modules



Archievements

  • Authenticated Users
  • Multiple Chat Rooms
  • Can be integrated to bots

Available Routes


  • POST /api/v1/user/ - Create User
  • POST /api/v1/user/login - Authenticate user
  • GET /ai/v1/message/:roomId - Retrieve the latest 50 messages given a room : roomId

P.S. : All routes requires and authorization token authorization : 't0k3nh3r3'



Bots

This API services use the bot list below:

  • Stock Bot - check out here
    • Command to call bot inside the rooms: /stock=STOCK_CODE



How to run

1- Install dependencies

npm i
##or
yarn

2- Set environment keys

PORT=         # Server Port:Default 5000
DB_HOST=      # Database Host (mongoDB)
DB_USER=      # Database user
DB_PASS=      # Database password
DB_NAME=      # Database name
APIKEY=       # Authorization APIKEY
PASSWORD_KEY= # Password Encryption Key
CORS_LIST=    # Socket CORS sites authorized
ROOMS_LIST=   # Socket Rooms List
BOT_LIST=     # Authorized Bot List

3 - Run Service

3.1 - In Development Mode

npm run dev
#or
yarn dev

3.2 - In Production Mode

npm start
#or
yarn start


TBD

  • Unit Tests
  • Increase token validation
  • Set up socket Token

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors