Skip to content

Latest commit

 

History

History
82 lines (75 loc) · 1.51 KB

README.md

File metadata and controls

82 lines (75 loc) · 1.51 KB

silex Build Status

Silex(lat. für Kiesel)


This is the Express MongoDB Controller Part.

For fixes and features please check the changelog.

Structure

Technology

  • Typescript
  • Express
  • MongoDB
  • HTTP/2

TO-DO

  • finish express server(✓)
  • change node.js to typescript(✓)
  • create unit tests(✓)
  • (optional) create code convergence
  • drop collections currently only manuell
  • create http/2 and https server(✓)
  • simple logging(✓)
  • update HTTP/2 Streaming

MessageSchema

{
    topic: string,
    deviceID: string,
    messageType: string,
    content: {
        (default: values,
        ...)
    },
    timestamp: byServer,
}

Sort:
{ key: 1 } // ascending
{ key: -1 } // descending

HTTP/2 Rest Endpoint

http://192.168.0.100:31672/
Default collecions is "IoT" GET
/messaging/:collection/find

{
    (search: {},)
    (sort: {},)
    (limit: number)
}

POST
/messaging/:collection/insert

{
"topic": string,
"deviceID": string,
"messageType": string,
"content": {
  ("value": "2")
   } 
}

DELETE
/messaging/:collection/delete

{
	"type": "one" or "many",
	"query": {}
}

HTTP/2 Streaming TO UI

This controller streams the insert to http://silex-dashboard:999, which is a HTTP/2 connection.