{"id":18537452,"url":"https://github.com/vitaee/nodeserverless","last_synced_at":"2026-04-14T00:05:14.502Z","repository":{"id":43718601,"uuid":"494117589","full_name":"Vitaee/NodeServerless","owner":"Vitaee","description":"simple example serverless api with aws","archived":false,"fork":false,"pushed_at":"2022-09-28T07:53:14.000Z","size":566,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-26T03:42:17.811Z","etag":null,"topics":["aws","nodejs","serverless-framework"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vitaee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-19T14:59:09.000Z","updated_at":"2023-03-08T01:01:24.000Z","dependencies_parsed_at":"2023-01-18T14:45:34.751Z","dependency_job_id":null,"html_url":"https://github.com/Vitaee/NodeServerless","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/Vitaee%2FNodeServerless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vitaee%2FNodeServerless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vitaee%2FNodeServerless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vitaee%2FNodeServerless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vitaee","download_url":"https://codeload.github.com/Vitaee/NodeServerless/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239255294,"owners_count":19608253,"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","nodejs","serverless-framework"],"created_at":"2024-11-06T19:38:12.976Z","updated_at":"2025-11-01T03:30:26.125Z","avatar_url":"https://github.com/Vitaee.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\ntitle: 'AWS TypeScript Express MySQL Example'\ndescription: 'This template demonstrates how to a rest api in to aws lambda.'\nlayout: Doc\nframework: v3\nplatform: AWS\nlanguage: nodeJS\npriority: 1\nauthorLink: 'https://github.com/Vitaee'\nauthorName: 'Can İlgu.'\nauthorAvatar: 'https://avatars.githubusercontent.com/u/45064650?v=4'\n--\u003e\n\n\n# Serverless Framework AWS TypeScript Example\n\nThis project contains express mysql rest api project with aws lambda. \n\n## Usage\nCheck simple instructions below. \n\n### Before Deployment\nFor env variables in production, i used s3 bucket. Simply upload your file to s3 then via github actions you can download from s3 to project directory to read variables.\n\n- Setup AWS CLI for your [OS](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html)\n- Upload your example file below;\n```\ntouch env.json\nnano env.json\n```\n```json\n{\n\"DB_NAME\":\"PROD_DB_NAME\",\n\"DB_USER\":\"PROD_DB_USER\",\n\"DB_PASS\":\"PROD_DB_PASS\",\n\"DB_HOST\":\"PROD_DB_HOST\",\n\"DB_PORT\":3306\n}\n```\nFinally,\n```\naws s3 cp env.json  s3://awsbucketvitae/\n\n```\n\n### Deployment\n\nIn order to deploy the project, you need to run the following command:\n\n```bash\n$ serverless deploy\n```\n\nAfter running deploy, you should see output similar to:\n\n```bash\nDeploying aws-node-express-api to stage dev (us-east-1)\n\n✔ Service deployed to stack aws-node-typescript-dev (112s)\n  - https://7cqzatbj16.execute-api.us-east-1.amazonaws.com/\n\nfunctions:\n  api: aws-node-express-api (806 B)\n```\n\n### Invocation\n\nAfter successful deployment, you can test the deployed api by using the following command:\n\n```bash\ncurl https://7cqzatbj16.execute-api.us-east-1.amazonaws.com/\n```\n\nWhich should result in response similar to the following:\n\n```json\n{\"msg\":\"Express server with TypeScript!\"}\n```\n\n### Local development\n\nYou should create env.json file according to .env.example:\n```json\n{\n\"DB_NAME\":\"slsnode\",\n\"DB_USER\":\"root\",\n\"DB_PASS\":\"123456\",\n\"DB_HOST\":\"172.17.0.3\",\n\"DB_PORT\":3306\n}\n```\nThen simply call this command;\n```bash\nnpm run dev\n```\n\nWhich should result in response similar to the following:\n```\nStarting Offline at stage dev (us-east-1)\n\nOffline [http for lambda] listening on http://localhost:3002\n\nANY | http://localhost:3001/{default*}       \n\nServer ready: http://localhost:3001 🚀\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitaee%2Fnodeserverless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitaee%2Fnodeserverless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitaee%2Fnodeserverless/lists"}