Node-Red 物联网平台二次开发教程1: github启动Red-Things项目
1.引言
Node-red预留了二次开发的接口,威武哥在前面的教程中也介绍了相关技术.
如果大家把这些技术都了解清楚了,那么恭喜你,已经具备了开发业务的能力.
威武哥利用Node-red和express 构建了一个物联网设备管理平台,项目名称:Red-Things.
代码已经上传到了github, 有需要的小伙伴可以去github拉取代码.
欢迎大家评论\转发\点赞,威武哥会在以后的日子里逐步完善项目.
github仓库地址: https://github.com/xqli82/Red-Things
2.介绍
Red-Things
IOT(Internet of things) platform based on Node-Red, Easy but very useful to built a iot system
Init project
npm install
Install views JS lib
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;
Config DB
only support mongoDB
dir /user_settings/index.js -> db_url
input your own mongoDB server address
Start to run
npm run server
Create admin account
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
Test
input url in browser: localhost:3000/login
you can see the web pages
Interface
- /login all url’s entry
- /main the main dashboard
- /red node-red editor
- /api node-red http interface
www.v5w.com
more information on my website: www.v5w.com(威武网)