Skip to content

IoTReady/bodh_cloud_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bodh Cloud Demo With Fly.io

Flow

This is an insecure implementation - secured using X509 certificates or other means.

  • Device opens connection to wss://<app-name>.fly.io/socket/websocket
  • Device connects to channel with {"event": "phx_join", "topic": "device:<device_id>", "ref": 0, "payload": {}}
  • Device sends data with {"event": "new_msg", "topic": "device:<device_id>", "ref": null, "payload": {"metric": "value"}}
  • {"metric": "value"} is stored in the events table alongwith device_id.

Run locally

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published