{"id":19350903,"url":"https://github.com/strmprivacy/nodejs-simulator-example","last_synced_at":"2025-11-14T20:08:54.483Z","repository":{"id":52855873,"uuid":"330986228","full_name":"strmprivacy/nodejs-simulator-example","owner":"strmprivacy","description":"An example event simulator using the JS/TS driver","archived":false,"fork":false,"pushed_at":"2021-04-16T09:29:12.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-06T15:47:18.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/strmprivacy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-19T13:18:46.000Z","updated_at":"2023-01-05T13:56:05.000Z","dependencies_parsed_at":"2022-08-23T00:31:04.123Z","dependency_job_id":null,"html_url":"https://github.com/strmprivacy/nodejs-simulator-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strmprivacy%2Fnodejs-simulator-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strmprivacy%2Fnodejs-simulator-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strmprivacy%2Fnodejs-simulator-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strmprivacy%2Fnodejs-simulator-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/strmprivacy","download_url":"https://codeload.github.com/strmprivacy/nodejs-simulator-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240459802,"owners_count":19804778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T04:34:19.426Z","updated_at":"2025-11-14T20:08:54.441Z","avatar_url":"https://github.com/strmprivacy.png","language":"TypeScript","readme":"# Simulates some events for Stream Machine\n\nNote this demo is a developer preview.\n\n# Create an account\n\nBrowse to [portal.streammachine.io](https://portal.streammachine.io) and create\nan account.\n\n# Download the cli\n\nBrowse to [cli\nreleases](https://github.com/streammachineio/cli/releases/latest) and\ndownload the version appropriate to your Operating System. Place this somewhere\nin your `$PATH`, and maybe rename it to `strm`.\n\nLog in `strm auth login` and note your `billing-id` that you need for creating\nstreams:\n\n    strm auth show\n    Credentials for ...\n    Billing id = ....\n\n\n# Follow along with the documentation\n\nBrowse to [the documentation](https://docs.streammachine.io).\n\n# Create a stream\n\n    strm stream create \u003cname\u003e\n\nThis creates a Stream Machine stream, and gives you credentials, something\nlike\n\n```\nstrm streams create demo\n{\n  \"name\": \"demo\", \"tags\": [],\n  \"credentials\": {\n    \"clientId\": \"9yzvcb23clv...\",\n    \"clientSecret\": \"4%VL8p$t1...\"\n  }\n}\n```\n\nYou need the credentials together with your `billing-id` if you want to send\ndata.\n\nFor the demonstration with Typescript, create file named `credentials.json`\nwith your billing-id, clientId and clientSecret in it.\n\n    {\n        \"billingId\": \"...\",\n        \"clientId\": \"...\",\n        \"clientSecret\": \"...\"\n    }\n\nYou should be able to start sending data:\n\n    npm i\n    npm run sender\n\nNote that you don't get any feedback when sending data if everything goes well.\nThe reason for this is that the Javascript driver and the Stream Machine gateway\nare capable of handling very high loads, and logging events would very quickly\nfill up log files.\n\nNote: Stream Machine has extensive metrics dashboards, but these are\nunfortunately not yet customer facing.\n\n# Retrieving Data\n\nThe demo we gave shows events being sent in batches to AWS S3. Follow along with\nthe [S3 documentation](https://docs.streammachine.io/docs/0.1.0/quickstart/index.html) to create a\ncredentials file that Stream Machine can use to store events from your stream\ninto an S3 bucket that you control footnote:[we'll improve the documentation to\nshow how to give more restrictive access to S3]\n\n\nOnce the Sink has been set up, you need to create an _exporter_ that\nperiodically batches data into your sink. See the [documentation](https://docs.streammachine.io/docs/0.1.0/quickstart/creating-streams.html#_exporting_to_s3).\n\nWith the exporter created you should be able to see json lines files in your s3\nbucket. Note: there is no mechanism yet to show exporter failures (permissions\nfor instance) of an exporter to the customer. Do *not hesitate* to go on the\n[support channel](https://gitter.im/stream-machine/community) if there's\nsomething not working as expected.\n\nGreetings\n\nBart van Deenen, Robin Trietsch\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrmprivacy%2Fnodejs-simulator-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrmprivacy%2Fnodejs-simulator-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrmprivacy%2Fnodejs-simulator-example/lists"}