NodeJS / Express and Restful API on the PI
Am now looking at how to provide a restful interface for the PI using NodeJS thankfully there was already a blog entry that explained how to get started with exposing a restful interface ( GET , POST , DELETE) using NodeJS express.
So if you are like me and want to have something clean and easy that gets you up and running check out the following :
http://blog.modulus.io/nodejs-and-express-create-rest-api
All the codes work seamlessly on the Raspberry PI .
I also found a NodeJS plugin which seems very promising to integration with omxplayer at the following link:
https://github.com/vabatta/omx-manager#basicusage
I have thus managed to integrate a REST API on the PI that allows me to Post a Request to play a file and it actually calls omxplayer and the video file is played on my HDMI TV.
I will post a sample Express NodeJS file once I have something working well with basic features e.g
1. Controls for pausing , forward etc..
2. Availability to display currently playing file in list
3. Looping
4. Amount of time remaining (no idea if this is achievable)
5. etc..
So if you are like me and want to have something clean and easy that gets you up and running check out the following :
http://blog.modulus.io/nodejs-and-express-create-rest-api
All the codes work seamlessly on the Raspberry PI .
I also found a NodeJS plugin which seems very promising to integration with omxplayer at the following link:
https://github.com/vabatta/omx-manager#basicusage
I have thus managed to integrate a REST API on the PI that allows me to Post a Request to play a file and it actually calls omxplayer and the video file is played on my HDMI TV.
I will post a sample Express NodeJS file once I have something working well with basic features e.g
1. Controls for pausing , forward etc..
2. Availability to display currently playing file in list
3. Looping
4. Amount of time remaining (no idea if this is achievable)
5. etc..
No comments:
Post a Comment