Coder Social home page Coder Social logo

honngyangnet / red-things Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xqli82/red-things

0.0 0.0 0.0 4.07 MB

IOT(internet of things) platform based on Node-Red, Easy but very useful to built a iot system

License: GNU General Public License v3.0

JavaScript 40.88% CSS 4.67% HTML 7.66% Vue 46.79%

red-things's Introduction

Red-Things

IOT(Internet of things) platform based on Node-Red, Easy but very useful to built iot system

Red-Things项目意义:基于Node-Red技术,快速构建一个简单好用的物联网平台.

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 will see the login page

login

Interface

  • /login all url's entry
  • /admin admin url
  • /client client url
  • /red node-red editor
  • /api node-red http interface

RedFunction

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(威武网):

https://www.v5w.com

demonstrate video(演示视频):

https://www.v5w.com/iot/259.html

red-things's People

Contributors

xqli82 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.