Create your own JavaScript-based MQTT broker & its client (subscriber & publisher) using Mosca & MQTT.js, then save the message from publisher on MySQL database. Mosca is a Node.js MQTT broker, which can be used standalone or embedded in another Node.js application (http://www.mosca.io/), while MQTT.js is an MQTT client for Node.js and the browser (https://github.com/mqttjs/MQTT.js).
Full tutorial & source code:
https://github.com/LintangWisesa/Mosca_MQTTjs_MySQL_MongoDB
* * * * * * * * * * * * * * * * * * * * * * *
Email: [email protected]
Fb: https://www.facebook.com/simplinnovation/
Twitter: https://twitter.com/Lintang_Wisesa
Blog: http://simplinnovation.blogspot.co.id/
Youtube: https://www.youtube.com/user/lintangbagus
Instructables: http://www.instructables.com/member/Lintang_Wisesa/instructables/
Hackster: https://www.hackster.io/lintangwisesa
GitHub: https://github.com/LintangWisesa
* * * * * * * * * * * * * * * * * * * * * * *
#simpLINnovation