{"id":18283609,"url":"https://github.com/thesmartmonkey/sls-multi-offline","last_synced_at":"2025-08-11T00:14:21.331Z","repository":{"id":57689261,"uuid":"482972140","full_name":"TheSmartMonkey/sls-multi-offline","owner":"TheSmartMonkey","description":"Run multiple serverless api or db instance under 1 URL for local development purposes","archived":false,"fork":false,"pushed_at":"2022-04-19T22:40:10.000Z","size":43210,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-13T13:49:09.834Z","etag":null,"topics":["serverless","serverless-dynamodb-local-plugin","serverless-framework","serverless-offline","serverless-offline-plugin"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/sls-multi-offline","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/TheSmartMonkey.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":"2022-04-18T19:31:30.000Z","updated_at":"2022-04-19T22:39:40.000Z","dependencies_parsed_at":"2022-09-26T20:53:29.213Z","dependency_job_id":null,"html_url":"https://github.com/TheSmartMonkey/sls-multi-offline","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TheSmartMonkey/sls-multi-offline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSmartMonkey%2Fsls-multi-offline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSmartMonkey%2Fsls-multi-offline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSmartMonkey%2Fsls-multi-offline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSmartMonkey%2Fsls-multi-offline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheSmartMonkey","download_url":"https://codeload.github.com/TheSmartMonkey/sls-multi-offline/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSmartMonkey%2Fsls-multi-offline/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269809726,"owners_count":24478604,"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-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["serverless","serverless-dynamodb-local-plugin","serverless-framework","serverless-offline","serverless-offline-plugin"],"created_at":"2024-11-05T13:10:07.245Z","updated_at":"2025-08-11T00:14:21.278Z","avatar_url":"https://github.com/TheSmartMonkey.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sls-multi-offline\n\nRun multiple serverless api or db instance under 1 URL for local development purposes \n\nThis repo is inspired from [sls-multi-gateways](https://github.com/edis/sls-multi-gateways)\n\nsls-multi-gateways is a tool that allows you to run multiple api gateways under one domain for local development purposes.\n\n[Here is a walkthrough article on medium](https://medium.com/@edisgonuler/run-multiple-serverless-applications-d8b38ef04f37)\n\n## Getting started\n\n### Installation\n\nsls-multi-offline needs to be installed globally using the following command:\n\n```bash\nnpm install -g sls-multi-offline\n```\n\n### Config\n\nAfter installing sls-multi-offline, cd into your project directory\n\n```bash\ncd [project-directory]\n```\n\nCreate a offline config file\n\n```bash\ntouch offline.yml\n```\n\nInside your sls-multi-offline config file add the services you would like to run\n\n```yaml\nport: [port the proxy will run on - (optional: default is 3100)]\nstage: [stage the proxy will run on - (optional: default is dev)]\nservices:\n  - name: [name of the service]\n    path: [proxy path to the service]\n    source: [path to the serverless.yml file belong to that service]\n    type: [api or db]\n  - name: [name of the service 2]\n    path: [proxy path to the service 2]\n    source: [path to the serverless.yml file belong to that service]\n    type: [api or db]\n```\n\nExemple :\n\n```yaml\nport: 3100\nservices:\n  - name: posts\n    path: posts\n    source: ./sample/posts\n    type: api\n  - name: users\n    path: users\n    source: ./sample/users\n    type: api\n  - name: db\n    path: db\n    source: ./sample/db\n    type: db\n```\n\nAll paths by default are mapped to `localhost:[port]/[path]`.\n\n### Usage\n\nTo run sls-multi-offline, execute the following cmd in the directory with the config file\n\n```bash\nsls-multi-offline\n```\n\n## For contributors\n\nDebug :\n\n```bash\nnpm run dev\n```\n\ncreate a post :\n\n```bash\ncurl -X POST -H \"Content-Type:application/json\" http://localhost:3100/dev/create-post --data '{ \"text\": \"Learn Serverless\" }'\n```\n\ncreate a user :\n\n```bash\ncurl -X POST -H \"Content-Type:application/json\" http://localhost:3101/dev/create-user --data '{ \"text\": \"Learn Serverless\" }'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesmartmonkey%2Fsls-multi-offline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesmartmonkey%2Fsls-multi-offline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesmartmonkey%2Fsls-multi-offline/lists"}