RingApi | Api in .NET 6 to communicate with the Ring Doorbell services
kandi X-RAY | RingApi Summary
kandi X-RAY | RingApi Summary
Api in .NET Standard 2.0 to communicate with the Ring Doorbell services
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of RingApi
RingApi Key Features
RingApi Examples and Code Snippets
Community Discussions
Trending Discussions on RingApi
QUESTION
I am currently working with the Ring-Client-API and am running into a small issue at the very end of my development. I succesfully created, tested, and ran my RingListener as an individual file, ie by executing RingListener.mjs. My goal is to now start the listener from another file location, and I am running into some issues trying to do that. I am more familiar with CommonJS so please feel free to point me in the right direction for ES6 stuff I am missing. I am running node 14.15.4
Code RingListener.mjs:
...ANSWER
Answered 2021-Jan-26 at 02:28I assume you are using dotenv
to load your credentials from your .env
file which you then pass on to the new RingApi({my credentials})
constructor.
If that's the case, the most likely reason it's failing is that dotenv
uses fs.readFileSync to read the .env
file which looks for files relative to the path where node js was executed and not relative to the path of the module. Which is why it stops working if you execute the app from the Start.mjs
which is in a different path.
If you really want to keep the dotenv config call inside your RingListener.mjs
file you can rewrite it to something like this which resolves the absolute path for the .env
file.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install RingApi
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page