https://github.com/gfrancodev/mygrid
Gateway AWS IotCore to Mongodb. Real-time data transition.
https://github.com/gfrancodev/mygrid
aws-iot-core iot nodejs solid typescript
Last synced: 7 days ago
JSON representation
Gateway AWS IotCore to Mongodb. Real-time data transition.
- Host: GitHub
- URL: https://github.com/gfrancodev/mygrid
- Owner: gfrancodev
- License: mit
- Created: 2021-06-23T20:53:50.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-02-03T17:54:44.000Z (over 3 years ago)
- Last Synced: 2025-08-13T21:41:55.113Z (11 months ago)
- Topics: aws-iot-core, iot, nodejs, solid, typescript
- Language: TypeScript
- Homepage:
- Size: 134 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
MyGrid
Gateway AWS IotCore to Mongodb.

The Service captures any data payload sent directly by the Amazon AWS Iot Core and sends
it to a database in Mongodb. The transferred data can be displayed in real time on the terminal.
EXECUTION COMMANDS
npm run build = Transpilation with babel ts for js.
npm run dev = Run in development environment.
npx pm2-runtime dist/index.js = Running in production environment.
PERFORMANCE

The application proved to be promising, with low latency in the event loop,
low CPU and memory consumption at short, medium and long periods of use.
ENVIRONMENT
For easy manipulation of the script, without necessarily having to make direct contact
with the code when making a simple change. Everything that is necessary for proper functioning
must be inserted in the other environment variables :
Variable to define the time of receipt of data according to your zone:
Forgot you time Zone? View your time zone here.
TIMEZONE= Ex: America/Sao_Paulo
Variable to set connection URI with Mongodb:
MONGOO_URI= mongodb+srv://:G@server.mongodb.net/?retryWrites=true&w=majority
Variables to define the connection to AWS IOT CORE via MQTT server.
Not familiar with AWS IOT CORE? Meet here
**NOTE:** Files referring to certificates and authentication keys must be informed by their storage url.
IOT_CORE_CERTPATH_URL= Ex: https://www.exemple.com/certPath.txt
IOT_CORE_KEYPATH_URL= Ex: https://www.exemple.com/key.txt
IOT_CORE_CATH_URL= Ex: https://www.exemple.com/ca.txt
IOT_CORE_HOST= Ex: Your Custom Endpoint
IOT_CORE_CLIENT_ID= Ex: Your Unique ClientI dentifier
IOT_CORE_TOPIC= Ex: Your Topic
To monitor application status, PM2 is a service that allows us to do real-time monitoring.
If you don't have an account, create a PM2 account right now Create an account here.
PM2_PUBLIC_KEY= Your Public Key
PM2_SECRET_KEY= Your Secret Key
DATABASE STRUCTURE
Very simple and dynamic structure, which allows accepting any data source provided by AWS Iot Core.
{
_id: Object Id
logs: Object that accepts any parameter
createdAt: Date Time ISO
}
Microservice powered by gfrancodev for Mygrid