{"id":23330501,"url":"https://github.com/iopipe/examples","last_synced_at":"2025-08-23T00:31:05.344Z","repository":{"id":37734489,"uuid":"89279920","full_name":"iopipe/examples","owner":"iopipe","description":"IOpipe Example Projects","archived":false,"fork":false,"pushed_at":"2022-12-10T01:32:02.000Z","size":547,"stargazers_count":7,"open_issues_count":17,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-09T22:03:29.636Z","etag":null,"topics":["example","examples","hello-world","iopipe","testing"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iopipe.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-24T19:37:00.000Z","updated_at":"2019-08-27T21:12:52.000Z","dependencies_parsed_at":"2023-01-26T01:32:10.726Z","dependency_job_id":null,"html_url":"https://github.com/iopipe/examples","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/iopipe%2Fexamples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iopipe%2Fexamples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iopipe%2Fexamples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iopipe%2Fexamples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iopipe","download_url":"https://codeload.github.com/iopipe/examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230650852,"owners_count":18259326,"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":["example","examples","hello-world","iopipe","testing"],"created_at":"2024-12-20T22:18:15.656Z","updated_at":"2024-12-20T22:18:16.080Z","avatar_url":"https://github.com/iopipe.png","language":"Java","readme":"# IOpipe Example Projects\n\nGet started with AWS Lambda \u0026 [IOpipe](https://iopipe.com) quickly with these starter projects.\n\n## Node.js\n\nFrom the repository directory, execute\n\n```bash\ncd node \u0026\u0026 npm run pkg\n```\n\nThis will download the dependencies for `iopipe` into your `node_modules` folder and package the assets into `archive.zip`.\n\nPoint your Lambda handler to `index.handler` for Node \u003e v6 (default).\n\nUpload the `archive.zip` archive.\n\nSet `IOPIPE_TOKEN` environment variable in the AWS web console to your project token.\n\nWhen you run a test of your new Lambda function, you should see an output of:\n\n```json\n{\n  \"statusCode\": 200,\n  \"body\": \"{\\\"message\\\":\\\"Your function executed successfully!\\\",\\\"input\\\":{\\\"key3\\\":\\\"value3\\\",\\\"key2\\\":\\\"value2\\\",\\\"key1\\\":\\\"value1\\\"}}\"\n}\n```\n\nIf you don't, create an issue here on GitHub, or reach out to us at support@iopipe.com\n\nThe available handler examples are:\n- index.js : Standard hello world for Node v6+\n- es5.js : Hello world for Node \u003c v6\n- express.js : A lambda built to run from an express app using `aws-serverless-express`\n- typescript.ts : Standard hello world for TypeScript (Be sure to compile with `tsc` before deploying)\n\n### TypeScript dependencies\nWe use [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped), an open-sourced repository, to manage our declaration files. You can add our types adding `@types/iopipe__iopipe` as a dependency. You may also need `@type/aws-lambda` and `@types/aws-node`.\n\n## Python\n\nFrom the repository directory, execute\n\n```bash\ncd python \u0026\u0026 python archive.py\n```\n\nThis will download the dependencies for `iopipe` into a `libs` folder and package the assets into `archive.zip`.\n\nPoint your Lambda handler to `index.handler`.\n\nUpload the `archive.zip` archive.\n\nSet `IOPIPE_TOKEN` environment variable in the AWS web console to your project token.\n\nWhen you run a test of your new Lambda function, you should see an output of:\n\n```json\n{\n  \"statusCode\": 200,\n  \"body\": \"{\\\"message\\\":\\\"Your function executed successfully!\\\",\\\"input\\\":{\\\"key3\\\":\\\"value3\\\",\\\"key2\\\":\\\"value2\\\",\\\"key1\\\":\\\"value1\\\"}}\"\n}\n```\n\nIf you don't, create an issue here on GitHub, or reach out to us at support@iopipe.com\n\nSee the [python library repo](https://github.com/iopipe/iopipe-python) for further instructions.\n\n## Java\n\nYou can run the example by running the following:\n\nFor Maven, run:\n\n\n```\n# Go to the Java directory\ncd java\n# Install dependencies\nmvn install\n# Package the code into target/ for serverless framework\nmvn package\n# Deploy with serverless framework\nsls deploy\n# Invoke the function with the name \"Friend\"\nsls invoke -f hello -d Friend\n```\n\nFor Gradle, this requires that `serverless.yml` be slightly modified because\nGradle places the JAR it creates at an alternative location, after performing\nthat step you may run:\n\n```\n# Go to the Java directory\ncd java\n# Build a shadowJar with Gradle\ngradle shadowJar\n# Deploy the project\nsls deploy\n# Invoke the function with the name \"Friend\"\nsls invoke -f hello -d Friend\n```\n\nThese classes contain various examples which may be used:\n\n * `com.iopipe.examples.Hello`\n   * Extends `com.iopipe.SimpleRequestHandlerWrapper`\n * `com.iopipe.examples.ManualHello`\n   * Creates an instance of `IOpipeService` then invokes the lambda.\n * `com.iopipe.examples.Lowercase`\n   * Extends `com.iopipe.SimpleRequestStreamHandlerWrapper`\n * `com.iopipe.examples.APIGatewayExample`\n   * Provides an example which utilizes API Gateway.\n\nFor reference `PlainHello` does not integrate with IOpipe:\n\n * `com.iopipe.examples.PlainHello`\n   * Implements `com.amazonaws.services.lambda.runtime.RequestHandler`.\n\nSee the [Java agent repository](https://github.com/iopipe/iopipe-java) for further instructions.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiopipe%2Fexamples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiopipe%2Fexamples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiopipe%2Fexamples/lists"}