{"id":15968845,"url":"https://github.com/mridang/serverless-servestatic-plugin","last_synced_at":"2025-03-18T00:30:42.499Z","repository":{"id":257774491,"uuid":"858501564","full_name":"mridang/serverless-servestatic-plugin","owner":"mridang","description":"A plugin for the serverless framework to deploy static assets to S3","archived":false,"fork":false,"pushed_at":"2025-02-05T05:04:51.000Z","size":985,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T05:56:26.274Z","etag":null,"topics":["aws","cloudformation","cloudfront","custom-resources","deployment","iac","s3","serverless","serverless-plugin","static-assets"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@mridang/serverless-servestatic-plugin","language":"TypeScript","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/mridang.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":"2024-09-17T02:25:01.000Z","updated_at":"2025-02-05T05:04:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c445634-02a2-4f13-b632-bb7db2b2cde2","html_url":"https://github.com/mridang/serverless-servestatic-plugin","commit_stats":null,"previous_names":["mridang/serverless-servestatic-plugin"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mridang%2Fserverless-servestatic-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mridang%2Fserverless-servestatic-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mridang%2Fserverless-servestatic-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mridang%2Fserverless-servestatic-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mridang","download_url":"https://codeload.github.com/mridang/serverless-servestatic-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243893827,"owners_count":20364916,"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","cloudformation","cloudfront","custom-resources","deployment","iac","s3","serverless","serverless-plugin","static-assets"],"created_at":"2024-10-07T19:04:17.266Z","updated_at":"2025-03-18T00:30:42.494Z","avatar_url":"https://github.com/mridang.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"A plugin for the Serverless framework to deploy the static assets into a separate\ndeployment bucket.\n\nThis ensures that that the lambda isn't invoked for serving assets which in turn\nreduces the costs and improves performace.\n\n\u003e [!NOTE]\n\u003e This plugin has only been tested with the AWS provider and will\n\u003e not work if you are deploying to other providers e.g. GCP.\n\n## Installation\n\nInstall using NPM by using the following command\n\n```sh\nnpm install --save-dev @mridang/serverless-servestatic-plugin\n```\n\nAnd then add the plugin to your `serverless.yml` file:\n\n```yaml\nplugins:\n  - @mridang/serverless-servestatic-plugin\n```\n\nA thorough guide on installing plugins can be found at\nhttps://www.serverless.com/framework/docs-guides-plugins\n\n## Usage\n\n### Configuration\n\nThe configuration of the plugin is done by defining a custom `servestatic`\nobject in your serverless.yml with your specific configuration.\n\nAll settings are optional and will be set to reasonable defaults if missing.\n\nSee the sections below for detailed descriptions of the settings.\n\n```yaml\ncustom:\n  servestatic:\n    include:\n      - 'public/**/*' # The list of assets to be included\n    exclude:\n      - '**/' # The list of assets to be excluded\n    public: false # A boolean indicating whether thr S3 bucket is public\n```\n\nIf `public` is enabled, the assets in the bucket can be served directly from the\nbucket. Public acess can be disabled if you intend to front the bucket via\nCloudFront.\n\n#### Using CloudFront\n\nWhen you trigger a deployment, the custom resource will unpack all the assets\nthat the match the glob patterns into the bucket that will be used for serving\nstatic assets.\n\n```\n$ sls deploy\n\nDeploying test-logcls to stage dev (us-east-1)\nCompiling with Typescript...\nUsing local tsconfig.json - tsconfig.json\nTypescript compiled.\n\n✔ Service deployed to stack test-logcls-dev (104s)\n\nendpoint: https://sfukfimmof3tinylzdbum77uvdu0xtznt.lambda-url.us-east-1.on.aws/\nfunctions:\n  probot: test-logcls-dev-probot (22 MB)\n\nNeed a faster logging experience than CloudWatch? Try our Dev Mode in Console: run \"serverless dev\"\n```\n\n## Contributing\n\nIf you have suggestions for how this app could be improved, or\nwant to report a bug, open an issue - we'd love all and any\ncontributions.\n\n## License\n\nApache License 2.0 © 2024 Mridang Agarwalla\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmridang%2Fserverless-servestatic-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmridang%2Fserverless-servestatic-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmridang%2Fserverless-servestatic-plugin/lists"}