{"id":28581023,"url":"https://github.com/victorsoares96/backend-template","last_synced_at":"2026-03-09T05:32:38.689Z","repository":{"id":49065604,"uuid":"517120502","full_name":"victorsoares96/backend-template","owner":"victorsoares96","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-03T21:06:18.000Z","size":1888,"stargazers_count":0,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-04T01:11:04.635Z","etag":null,"topics":["aws-lambda","express","express-serverless","mysql","serverless","typeorm"],"latest_commit_sha":null,"homepage":"https://w451e6ihbe.execute-api.us-east-1.amazonaws.com","language":"TypeScript","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/victorsoares96.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-07-23T17:21:16.000Z","updated_at":"2024-05-31T22:01:47.000Z","dependencies_parsed_at":"2023-02-14T05:45:33.827Z","dependency_job_id":"d56e2a64-be2a-4d1b-b2a4-866ed07ce417","html_url":"https://github.com/victorsoares96/backend-template","commit_stats":null,"previous_names":[],"tags_count":11,"template":true,"template_full_name":null,"purl":"pkg:github/victorsoares96/backend-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorsoares96%2Fbackend-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorsoares96%2Fbackend-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorsoares96%2Fbackend-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorsoares96%2Fbackend-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/victorsoares96","download_url":"https://codeload.github.com/victorsoares96/backend-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorsoares96%2Fbackend-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30283917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","express","express-serverless","mysql","serverless","typeorm"],"created_at":"2025-06-11T04:15:25.410Z","updated_at":"2026-03-09T05:32:38.670Z","avatar_url":"https://github.com/victorsoares96.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example\n\nIn addition to a basic Lambda function and Express server, the `example`\ndirectory includes a [Swagger file](http://swagger.io/specification/),\n[CloudFormation\ntemplate](https://aws.amazon.com/cloudformation/aws-cloudformation-templates/)\nwith [Serverless Application Model\n(SAM)](https://github.com/awslabs/serverless-application-model), and helper\nscripts to help you set up and manage your application.\n\n## Steps for running the example\n\nThis guide assumes you have already [set up an AWS\naccount](http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/AboutAWSAccounts.html)\nand have the latest version of the [AWS CLI](https://aws.amazon.com/cli/) and\n[AWS SAM](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html)\ninstalled.\n\n1. From your preferred project directory:\n\n```sh\n  git clone https://github.com/vendia/serverless-express.git \u0026\u0026 cd serverless-express/examples/basic-starter-api-gateway-v2-typescript\n```\n\n1. Update the `config` section of `package.json` with your `s3BucketName` and\n   `region` (optionally, change the `cloudFormationStackName`). If the bucket\n   you specify does not yet exist, the next step will create it for you.\n1. (optional: domain) If you want to use a custom domain name for your\n   application/API, specify it in the `config.domain` section of `package.json`.\n   This example assumes the domain is registered in Route53 in the same account\n   you're deploying the example to.\n1. Run `npm run setup` - this installs the node dependencies, creates an S3\n   bucket (if it does not already exist), packages and deploys your serverless\n   Express application to AWS Lambda, and creates an API Gateway proxy API.\n1. (optional: domain) If you specify a domain, the example will create an SSL\n   Certificate via Amazon Certificate Manager; create an API Gateway Domain Name\n   record which maps the domain to the API and Stage; and create a Route53\n   HostedZone and RecordSet with an A record pointing at the API Gateway Domain\n   Name's CloudFront Distribution.\n   1. During deployment you should receive an email at one of the registered\n      email addresses for the domain. Approve the SSL Certificate by clicking\n      the link in the email. The stack creation will pause while waiting for\n      this approval.\n   1. Wait for stack creation to complete and update Route53 Domain Name to use\n      the Name Servers from the created Hosted Zone NS Record (don't include the\n      trailing '.') via the AWS console.\n   1. It may take several hours before the DNS records propagate.\n1. After the setup command completes, open the AWS CloudFormation console\n   https://console.aws.amazon.com/cloudformation/home and switch to the region\n   you specified. Select the `ServerlessExpressStack` stack (or the stack name\n   you specified for `cloudFormationStackName`), then click the `ApiUrl` value\n   under the **Outputs** section - this will open a new page with your running\n   API. The API index lists the resources available in the example Express\n   server (`app.js`), along with example `curl` commands.\n1. (optional) To enable the `invoke-lambda` `package.json` `script`: copy the\n   `LambdaFunctionName` from the CloudFormation Outputs and paste it into the\n   `package.json` `config`'s `functionName` property.\n   Run `npm run invoke-lambda` to invoke the Lambda Function with the payload\n   specified in `api-gateway-event.json`.\n\nSee the sections below for details on how to migrate an existing (or create a\nnew) Node.js project based on this example. If you would prefer to delete AWS\nassets that were just created, simply run `npm run delete-stack` to delete the\nCloudFormation Stack, including the API and Lambda Function. If you specified a\nnew bucket in the `config` command for step 1 and want to delete that bucket,\nrun `npm run delete-bucket`.\n\n## Creating or migrating a Node.js project based on the example\n\nTo use this example as a base for a new Node.js project:\n\n1. Copy the files in the `examples/basic-starter-api-gateway-v2-typescript`\n   directory into a new project directory (`cp -r ./examples/basic-starter-api-gateway-v2-typescript ~/projects/my-new-node-project`). If you have not already done so, follow the\n   [steps for running the example](#steps-for-running-the-example) (you may want\n   to first modify some of the resource names to something more\n   project-specific, eg. the CloudFormation stack, Lambda function, and API\n   Gateway API).\n1. After making updates to `app.js`, simply run `npm run package-deploy`.\n\nTo migrate an existing Node server:\n\n1. Copy the following files from this directory: `api-gateway-event.json`,\n   `sam-template.yaml`, and `lambda.js`. Additionally, copy the `scripts` and\n   `config` sections of `example/package.json` into your existing\n   `package.json` - this includes many helpful commands to manage your AWS\n   serverless assets and perform _basic_ local simulation of API Gateway and\n   Lambda. If you have not already done so, follow the [steps for running the\n   example](#steps-for-running-the-example).\n1. From your existing project directory, run\n\n```sh\nnpm install --save @vendia/serverless-express\n```\n\n1. Modify `lambda.ts` to import your own server configuration (eg. change\n   `require('./app')` to `require('./server')`). You will need to ensure you\n   export your app configuration from the necessary file (eg. `module.exports = app`). This library takes your app configuration and listens on a Unix Domain\n   Socket for you, so you can remove your call to `app.listen()`.\n1. Modify the `CodeUri` property of the Lambda function resource in\n   `sam-template.yaml` to point to your application directory (e.g. `CodeUri: ./src`). If you are using a build tool (e.g. Gulp, Grunt, Webpack, Rollup,\n   etc.), you will instead want to point to your build output directory.\n1. Run `npm run package-deploy`.\n\nTo perform a basic, local simulation of API Gateway and Lambda with your Node\nserver, update `api-gateway-event.json` with some values that are valid for your\nserver (`httpMethod`, `path`, `body` etc.) and run `npm run local`.\n\nIf you need to make modifications to your API Gateway API or other AWS\nresources, modify `sam-template.yaml` and run `npm run package-deploy`.\n\n## Node.js version\n\nThis example was written against Node.js 12\n\n## Development\n\nTo update this example against the latest local changes to\n@vendia/serverless-express:\n\n```bash\nnpm i ../..\nnpm run build\nnpm run local\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorsoares96%2Fbackend-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvictorsoares96%2Fbackend-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorsoares96%2Fbackend-template/lists"}