IOT(Internet of things) platform based on Node-Red, Easy but very useful to built iot system
Red-Things项目意义:基于Node-Red技术,快速构建一个简单好用的物联网平台.
npm install
cd public
npm install
why?
Important pages render in backend;
And login.html is all pages's entry;
There will be different Vue projects in Red-Things in the future;
only support mongoDB
dir /user_settings/index.js -> db_url
input your own mongoDB server address
npm run server
input below command in terminal:
node utils/createUser.js username password
or
cd utils
node createUser.js username password
- username : your own account name
- password : your own password
input url in browser: localhost:3000/login
you will see the login page
- /login all url's entry
- /admin admin url
- /client client url
- /red node-red editor
- /api node-red http interface
define yourself function,and export it;
you can use global.get('function name') to get the function in node-red, then you can use it!
example:
//testFun.js
module.exports=function(){
console.log('test function is running-----------');
}
//export module
// RedFunction/index.js
module.exports={
testFun
}
//in node-red
//get it
const testFun= global.get('testFun');
//use it
testFun();
more information in my website(威武网):
demonstrate video(演示视频):