{"id":13989669,"url":"https://github.com/1Strategy/serverless-ci-cd","last_synced_at":"2025-07-22T11:31:03.653Z","repository":{"id":139642888,"uuid":"114298002","full_name":"1Strategy/serverless-ci-cd","owner":"1Strategy","description":"Serverless demo using Code Build and CodePipeline for CI/CD","archived":false,"fork":false,"pushed_at":"2023-04-19T17:25:19.000Z","size":415,"stargazers_count":22,"open_issues_count":6,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-29T08:39:25.045Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1Strategy.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":"2017-12-14T21:29:48.000Z","updated_at":"2023-04-26T23:51:23.000Z","dependencies_parsed_at":"2023-07-23T08:01:55.558Z","dependency_job_id":null,"html_url":"https://github.com/1Strategy/serverless-ci-cd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/1Strategy/serverless-ci-cd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Strategy%2Fserverless-ci-cd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Strategy%2Fserverless-ci-cd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Strategy%2Fserverless-ci-cd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Strategy%2Fserverless-ci-cd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1Strategy","download_url":"https://codeload.github.com/1Strategy/serverless-ci-cd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Strategy%2Fserverless-ci-cd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266483527,"owners_count":23936359,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-08-09T13:01:56.160Z","updated_at":"2025-07-22T11:31:03.338Z","avatar_url":"https://github.com/1Strategy.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Serverless CI/CD Tutorial\n## Building, testing, and deploying Serverless apps using CodeBuild and CodePipeline\n\nThis repo is the demo code for a [three-part tutorial](http://www.1strategy.com/blog/) on managing unit testing, integration testing, and deployment of apps built using the Serverless framework.\n\nTo play with this code locally, clone this repo and do the following:\n\n### 1. Install global npm modules\n```\nnpm install -g serverless eslint jest\n```\n\n### 2. Install local npm modules\nNavigate to the app directory, and run\n```\nnpm install\n```\n### 3. Bring up the DB\n```\nsls dynamodb install --stage dev\nsls dynamodb start --stage dev\nsls dynamodb migrate --stage dev\n```\nThis series of commands installs a local DynamoDB, starts it, and creates any tables specified in the `serverless.yml`. Check your shell at [http://localhost:8000/shell/](http://localhost:8000/shell/) to interact with the db and view the created table.\n\n### 4. Start the offline app\n```\nsls offline start --stage dev\n```\n\nThe app is now available at `http://localhost:3000`.\n\nThe app has two endpoints:\n\n#### GET /todos\nReturns a list of todos:\n```\n[\n    {\n        \"id\": \"9b3c415f-ceaa-49e3-b5af-0e335bfd4635\",\n        \"completed\": false,\n        \"title\": \"do things!\",\n        \"updatedAt\": 1513817875660\n    }\n]\n```\n\n#### POST /todos\nAccepts an object in this format:\n```\n{\n\t\"title\": \"do things!\",\n\t\"completed\": false\n}\n```\nReturns a status of 200. The created object is not returned;  you can see it with a GET /todos.\n\n### 5. Run Tests\nTo run unit tests, use\n```\nnpm test\n```\n\nTo lint, use\n```\nnpm run-script lint\n```\n\nTo run integration tests, use\n```\nnpm run-script integration\n```\n\n### 6. Make Changes\nIf you change the `serverless.yml` file, you'll need to restart your local app:\n- Stop the offline app; `ctrl-c` in the terminal where it's running is all you need. It's fine to leave the db running.\n- Uncomment the line in the `serverless.yml` file that says `noStart: true`. This will prevent serverless offline from trying to start a new database.\n- Run `sls offline start --stage dev` again.\n\nChanges to any other file in the app (e.g. a handler) will be reflected immediately, and don't require a restart.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1Strategy%2Fserverless-ci-cd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1Strategy%2Fserverless-ci-cd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1Strategy%2Fserverless-ci-cd/lists"}