RocketChat / Rocket.Chat.js.SDK

Utility for apps and bots to interact with Rocket.Chat via DDP and/or API
MIT License
136 stars 95 forks source link

Local Setup #66

Closed knrt10 closed 5 years ago

knrt10 commented 5 years ago

I am trying to run this repo locally. I have started the Rocket.Chat client locally using their dockerfile and is running on localhost:80. Now when I try to start Rocket.Chat.js.SDK using .env file. It is not using the env variables when I do yarn start.

I have placed my .env file in root folder and it contain

ROCKETCHAT_URL=http://localhost/channel/test
ROCKETCHAT_USER=username  
ROCKETCHAT_PASSWORD=password

Fix is require('dotenv').config() in src/utils/config.ts. Will make a PR for the same.

cc @timkinnane

knrt10 commented 5 years ago

Solved, as we can set .env variables from shell using export