{"id":23605819,"url":"https://github.com/azkarmoulana/notes-app-api","last_synced_at":"2025-11-05T12:30:27.731Z","repository":{"id":40354433,"uuid":"264629991","full_name":"azkarmoulana/notes-app-api","owner":"azkarmoulana","description":":zap: :zap: Serverless API with Node.js 12.0X ","archived":false,"fork":false,"pushed_at":"2023-03-03T00:05:57.000Z","size":1727,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-27T13:13:19.591Z","etag":null,"topics":["aws","aws-apigateway","aws-lambda","es6","es7","javascript","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/azkarmoulana.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":"2020-05-17T09:45:12.000Z","updated_at":"2023-03-08T03:00:39.000Z","dependencies_parsed_at":"2023-02-08T15:00:39.842Z","dependency_job_id":null,"html_url":"https://github.com/azkarmoulana/notes-app-api","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/azkarmoulana%2Fnotes-app-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azkarmoulana%2Fnotes-app-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azkarmoulana%2Fnotes-app-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azkarmoulana%2Fnotes-app-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azkarmoulana","download_url":"https://codeload.github.com/azkarmoulana/notes-app-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239458915,"owners_count":19642099,"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","aws-apigateway","aws-lambda","es6","es7","javascript","nodejs","serverless","serverless-framework"],"created_at":"2024-12-27T13:13:22.490Z","updated_at":"2025-11-05T12:30:27.680Z","avatar_url":"https://github.com/azkarmoulana.png","language":"JavaScript","readme":"# Serverless Node.js Starter\n\nA Serverless starter that adds ES7 syntax, 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 (an extension of the [serverless-webpack](https://github.com/serverless-heaven/serverless-webpack) plugin) and the [serverless-offline](https://github.com/dherault/serverless-offline) plugin. It supports:\n\n- **Generating optimized Lambda packages with Webpack**\n- **Use ES7 syntax in your handler functions**\n  - Use `import` and `export`\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 ES7 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#### Linting\n\nWe use [ESLint](https://eslint.org) to lint your code via the [serverless-bundle](https://github.com/AnomalyInnovations/serverless-bundle) plugin.\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 [Anomaly Innovations](https://anoma.ly); makers of [Seed](https://seed.run) and [Serverless Stack](https://serverless-stack.com).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazkarmoulana%2Fnotes-app-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazkarmoulana%2Fnotes-app-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazkarmoulana%2Fnotes-app-api/lists"}