{"id":21253565,"url":"https://github.com/gamadorh/serverless-hello-world","last_synced_at":"2026-04-16T19:31:42.376Z","repository":{"id":121589629,"uuid":"327762693","full_name":"gAmadorH/serverless-hello-world","owner":"gAmadorH","description":"Hello World application with Serverless Framework.","archived":false,"fork":false,"pushed_at":"2021-01-27T20:10:21.000Z","size":170,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-21T21:13:11.298Z","etag":null,"topics":["aws","example","hello-world","nodejs","serverless","serverless-framework"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gAmadorH.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-08T01:01:30.000Z","updated_at":"2021-01-27T20:10:24.000Z","dependencies_parsed_at":"2023-03-24T03:17:53.445Z","dependency_job_id":null,"html_url":"https://github.com/gAmadorH/serverless-hello-world","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/gAmadorH%2Fserverless-hello-world","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gAmadorH%2Fserverless-hello-world/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gAmadorH%2Fserverless-hello-world/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gAmadorH%2Fserverless-hello-world/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gAmadorH","download_url":"https://codeload.github.com/gAmadorH/serverless-hello-world/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243690146,"owners_count":20331728,"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":["aws","example","hello-world","nodejs","serverless","serverless-framework"],"created_at":"2024-11-21T03:52:07.208Z","updated_at":"2025-12-29T19:36:18.146Z","avatar_url":"https://github.com/gAmadorH.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# serverless-hello-world\n\n![Node.js CI](https://github.com/gAmadorH/serverless-hello-world/workflows/Node.js%20CI/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/gAmadorH/serverless-hello-world/badge.svg?branch=main)](https://coveralls.io/github/gAmadorH/serverless-hello-world?branch=main)\n[![dependencies status](https://david-dm.org/gAmadorH/serverless-hello-world.svg)](https://david-dm.org/gAmadorH/serverless-hello-world)\n[![dev dependencies status](https://david-dm.org/gAmadorH/serverless-hello-world/dev-status.svg)](https://david-dm.org/gAmadorH/serverless-hello-world#info=devDependencies)\n[![license](https://img.shields.io/github/license/gAmadorH/serverless-hello-world.svg?color=blue)](https://github.com/gAmadorH/serverless-hello-world/blob/main/LICENSE)\n[![code style](https://img.shields.io/badge/code_style-eslint-blueviolet.svg)](https://eslint.org/)\n[![style guide](https://img.shields.io/badge/style_guide-airbnb-ff69b4.svg)](https://github.com/airbnb/javascript)\n[![GitHub issues](https://img.shields.io/github/issues/gAmadorH/serverless-hello-world)](https://github.com/gAmadorH/serverless-hello-world/issues)\n\nHello World application with Serverless Framework.\n\n## requirements\n\n- [NodeJS v12.18.3+](https://nodejs.org/en/) or [nvm v0.37.0+](https://github.com/nvm-sh/nvm/releases/tag/v0.37.0)\n- [AWS Account](https://aws.amazon.com/)\n  - Access Key Id (key)\n  - Secret Access Key (secret)\n\n## Install serverless framework\n\nInstall globally `serverless framework` using npm:\n\n```bash\nnpm i -g serverless\n```\n\nNow you can use it with `serverless` or `sls` command in your terminal.\n\n## Config serverless framework credentials\n\nConfig serverless framework credentials (AWS as provider):\n\n```bash\nsls config credentials \\\n  --provider aws \\\n  --key your-aws-key \\\n  --secret your-aws-secret\n```\n\nThis command has configured the AWS credentials in the `default profile`.  \nYou can use the `--profile` flag to specific a profile.\n`development` profile for example:\n\n```bash\nsls config credentials \\\n  --provider aws \\\n  --profile development \\\n  --key your-aws-key \\\n  --secret your-aws-secret\n```\n\n## Create a project boilerplate\n\nCreate a project directory and use a template:\n\n```bash\nmkdir serverless-test \u0026\u0026 cd $_\nsls create --template aws-nodejs --name serverless-test\n```\n\nIt has created 2 files, `serverless.yml` and h`handler.js`  \nthe last file has a hello function, it does not a trigger event associated  \nthen we have to add it, we are going yo use a http event,  \nso add this (in the `hello` function in the `serverless.yml` file):\n\n```yml\nevents:\n  - http:\n      method: get\n      path: /hello\n```\n\nThe files should look like this:\n\n```yml\nservice: serverless-test\n\nframeworkVersion: \"2\"\n\nprovider:\n  name: aws\n  runtime: nodejs12.x\n  lambdaHashingVersion: 20201221\n\nfunctions:\n  hello:\n    handler: handler.hello\n    events:\n      - http:\n          method: get\n          path: /hello\n```\n\n## Deploy your project\n\nTo deploy your new function run (using default profile):\n\n```bash\nsls deploy\n```\n\nIf you want to use other profile, you can specify using `--aws-profile` option:\n\n```bash\nsls deploy --aws-profile development\n```\n\nWhen you execute the command, information about your service appears in your terminal,\nlook for `endpoints:` key, it looks something like this:\n\n```bash\nendpoints:\n  GET - https://something.execute-api.us-east-1.amazonaws.com/dev/hello\n```\n\nNow you can hit in the API endpoint:\n\n```bash\ncurl https://something.execute-api.us-east-1.amazonaws.com/dev/hello\n```\n\n## Watch logs\n\nTo watch logs run:\n\n```bash\nsls logs -t -f hello\n# or\nsls logs --tail --function hello\n```\n\nThe function name is defined in the `serverless.yml`:\n\n```yml\nfunctions:\n  hello: # this is the function name\n    handler: handler.hello\n```\n\n## Destroy\n\nTo destroy the infrastructure created by serverless framework run:\n\n```bash\nsls remove\n```\n\n## License\n\n[MIT.](./LICENSE) Copyright (c)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamadorh%2Fserverless-hello-world","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgamadorh%2Fserverless-hello-world","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamadorh%2Fserverless-hello-world/lists"}