{"id":22406843,"url":"https://github.com/kiquetal/serverless-nodejs-starter","last_synced_at":"2026-05-02T14:37:14.531Z","repository":{"id":77012257,"uuid":"453115059","full_name":"kiquetal/serverless-nodejs-starter","owner":"kiquetal","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-04T15:33:52.000Z","size":592,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T07:20:14.573Z","etag":null,"topics":["aws-lambda-node","nodejs","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/kiquetal.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":"2022-01-28T15:18:29.000Z","updated_at":"2022-02-06T05:19:35.000Z","dependencies_parsed_at":"2023-03-11T23:53:04.117Z","dependency_job_id":null,"html_url":"https://github.com/kiquetal/serverless-nodejs-starter","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/kiquetal%2Fserverless-nodejs-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiquetal%2Fserverless-nodejs-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiquetal%2Fserverless-nodejs-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiquetal%2Fserverless-nodejs-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiquetal","download_url":"https://codeload.github.com/kiquetal/serverless-nodejs-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245767243,"owners_count":20668822,"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-lambda-node","nodejs","serverless-framework"],"created_at":"2024-12-05T11:11:03.911Z","updated_at":"2026-05-02T14:37:14.479Z","avatar_url":"https://github.com/kiquetal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless Node.js Starter [![Seed Status](https://api.seed.run/serverless-stack/serverless-nodejs-starter/stages/prod/build_badge)](https://console.seed.run/serverless-stack/serverless-nodejs-starter)\n\nA Serverless starter that adds ES6, TypeScript, serverless-offline, linting, environment variables, and unit test support. Part of the [Serverless Stack](http://serverless-stack.com) guide.\n\n[Serverless Node.js Starter](https://github.com/AnomalyInnovations/serverless-nodejs-starter) uses the [serverless-bundle](https://github.com/AnomalyInnovations/serverless-bundle) plugin and the [serverless-offline](https://github.com/dherault/serverless-offline) plugin. It supports:\n\n- **Generating optimized Lambda packages with Webpack**\n- **Using ES6 or TypeScript in your handler functions**\n- **Run API Gateway locally**\n  - Use `serverless offline start`\n- **Support for unit tests**\n  - Run `npm test` to run your tests\n- **Sourcemaps for proper error messages**\n  - Error message show the correct line numbers\n  - Works in production with CloudWatch\n- **Lint your code with ESLint**\n- **Add environment variables for your stages**\n- **No need to manage Webpack or Babel configs**\n\n---\n\n### Demo\n\nA demo version of this service is hosted on AWS - [`https://z6pv80ao4l.execute-api.us-east-1.amazonaws.com/dev/hello`](https://z6pv80ao4l.execute-api.us-east-1.amazonaws.com/dev/hello)\n\nAnd here is the ES6 source behind it\n\n``` javascript\nexport const hello = async (event, context) =\u003e {\n  return {\n    statusCode: 200,\n    body: JSON.stringify({\n      message: `Go Serverless v1.0! ${(await message({ time: 1, copy: 'Your function executed successfully!'}))}`,\n      input: event,\n    }),\n  };\n};\n\nconst message = ({ time, ...rest }) =\u003e new Promise((resolve, reject) =\u003e\n  setTimeout(() =\u003e {\n    resolve(`${rest.copy} (with a delay)`);\n  }, time * 1000)\n);\n```\n\n### Upgrading from v1.x\n\nWe have detailed instructions on how to upgrade your app to the v2.0 of the starter if you were using v1.x before. [Read about it here](https://github.com/AnomalyInnovations/serverless-nodejs-starter/releases/tag/v2.0).\n\n### Requirements\n\n- [Install the Serverless Framework](https://serverless.com/framework/docs/providers/aws/guide/installation/)\n- [Configure your AWS CLI](https://serverless.com/framework/docs/providers/aws/guide/credentials/)\n\n### Installation\n\nTo create a new Serverless project.\n\n``` bash\n$ serverless install --url https://github.com/AnomalyInnovations/serverless-nodejs-starter --name my-project\n```\n\nEnter the new directory\n\n``` bash\n$ cd my-project\n```\n\nInstall the Node.js packages\n\n``` bash\n$ npm install\n```\n\n### Usage\n\nTo run a function on your local\n\n``` bash\n$ serverless invoke local --function hello\n```\n\nTo simulate API Gateway locally using [serverless-offline](https://github.com/dherault/serverless-offline)\n\n``` bash\n$ serverless offline start\n```\n\nDeploy your project\n\n``` bash\n$ serverless deploy\n```\n\nDeploy a single function\n\n``` bash\n$ serverless deploy function --function hello\n```\n\n#### Running Tests\n\nRun your tests using\n\n``` bash\n$ npm test\n```\n\nWe use Jest to run our tests. You can read more about setting up your tests [here](https://facebook.github.io/jest/docs/en/getting-started.html#content).\n\n#### Environment Variables\n\nTo add environment variables to your project\n\n1. Rename `env.example` to `.env`.\n2. Add environment variables for your local stage to `.env`.\n3. Uncomment `environment:` block in the `serverless.yml` and reference the environment variable as `${env:MY_ENV_VAR}`. Where `MY_ENV_VAR` is added to your `.env` file.\n4. Make sure to not commit your `.env`.\n\n#### TypeScript\n\nIf [serverless-bundle](https://github.com/AnomalyInnovations/serverless-bundle) detects a `tsconfig.json` in your service root, it'll compile it using TypeScript. We have a separate starter for TypeScript here, [**Serverless TypeScript Starter**](https://github.com/AnomalyInnovations/serverless-typescript-starter).\n\n#### Linting\n\nWe use [ESLint](https://eslint.org) to lint your code via [serverless-bundle](https://github.com/AnomalyInnovations/serverless-bundle).\n\nYou can turn this off by adding the following to your `serverless.yml`.\n\n``` yaml\ncustom:\n  bundle:\n    linting: false\n```\n\nTo [override the default config](https://eslint.org/docs/user-guide/configuring), add a `.eslintrc.json` file. To ignore ESLint for specific files, add it to a `.eslintignore` file.\n\n### Support\n\n- Open a [new issue](https://github.com/AnomalyInnovations/serverless-nodejs-starter/issues/new) if you've found a bug or have some suggestions.\n- Or submit a pull request!\n\n---\n\nThis repo is maintained by [Serverless Stack](https://serverless-stack.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiquetal%2Fserverless-nodejs-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiquetal%2Fserverless-nodejs-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiquetal%2Fserverless-nodejs-starter/lists"}