{"id":13880964,"url":"https://github.com/pharindoko/json-serverless","last_synced_at":"2026-01-12T07:28:45.337Z","repository":{"id":35932668,"uuid":"164940759","full_name":"pharindoko/json-serverless","owner":"pharindoko","description":"Transform a JSON file into a serverless REST API in AWS cloud","archived":false,"fork":false,"pushed_at":"2023-10-19T04:55:25.000Z","size":26685,"stargazers_count":206,"open_issues_count":17,"forks_count":27,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-30T03:25:09.843Z","etag":null,"topics":["api","aws","deployment","graphql","json","json-file","json-server","lambda","nodejs","rest","rest-api","serverless","serverless-framework","swagger-ui","webpack"],"latest_commit_sha":null,"homepage":"","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/pharindoko.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2019-01-09T21:27:45.000Z","updated_at":"2025-10-06T02:57:10.000Z","dependencies_parsed_at":"2024-01-16T12:02:28.498Z","dependency_job_id":null,"html_url":"https://github.com/pharindoko/json-serverless","commit_stats":{"total_commits":1224,"total_committers":14,"mean_commits":87.42857142857143,"dds":0.5073529411764706,"last_synced_commit":"a28e68aa50dac30f89e06fe8ed51a0f32fb1d43f"},"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"purl":"pkg:github/pharindoko/json-serverless","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharindoko%2Fjson-serverless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharindoko%2Fjson-serverless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharindoko%2Fjson-serverless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharindoko%2Fjson-serverless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pharindoko","download_url":"https://codeload.github.com/pharindoko/json-serverless/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharindoko%2Fjson-serverless/sbom","scorecard":{"id":730601,"data":{"date":"2025-08-11","repo":{"name":"github.com/pharindoko/json-serverless","commit":"70d43ae06e81e16a7bcb0be1cefa5d01f704a773"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/server.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/pharindoko/json-serverless/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/pharindoko/json-serverless/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/pharindoko/json-serverless/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/pharindoko/json-serverless/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/server.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/pharindoko/json-serverless/server.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/server.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/pharindoko/json-serverless/server.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/server.yml:24","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"78 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-rrc9-gqf8-8rwg","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-h452-7996-h45h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-6c9x-mj3g-h47x","Warn: Project is vulnerable to: GHSA-qrmm-w75w-3wpx","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc","Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-8hc4-vh64-cxmj","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-75v8-2h7p-7m2m","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-pppg-cpfq-h7wr","Warn: Project is vulnerable to: GHSA-hw8r-x6gr-5gjp","Warn: Project is vulnerable to: GHSA-8cf7-32gw-wr33","Warn: Project is vulnerable to: GHSA-hjrf-2m68-5959","Warn: Project is vulnerable to: GHSA-qwph-4952-7xr6","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-6fx8-h7jm-663j","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-3f95-r44v-8mrg","Warn: Project is vulnerable to: GHSA-28xr-mwxg-3qc8","Warn: Project is vulnerable to: GHSA-9p95-fxvg-qgq2","Warn: Project is vulnerable to: GHSA-9w5j-4mwv-2wj8","Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-cj88-88mr-972w","Warn: Project is vulnerable to: GHSA-36fh-84j7-cv5h","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-h755-8qp9-cq85","Warn: Project is vulnerable to: GHSA-qm95-pgcg-qqfq","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-v923-w3x8-wh69"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T14:18:20.377Z","repository_id":35932668,"created_at":"2025-08-22T14:18:20.377Z","updated_at":"2025-08-22T14:18:20.377Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28336519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["api","aws","deployment","graphql","json","json-file","json-server","lambda","nodejs","rest","rest-api","serverless","serverless-framework","swagger-ui","webpack"],"created_at":"2024-08-06T08:03:42.365Z","updated_at":"2026-01-12T07:28:45.322Z","avatar_url":"https://github.com/pharindoko.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# JSON Serverless [![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/) [![Build Status](https://travis-ci.org/pharindoko/json-serverless.svg?branch=master)](https://travis-ci.org/pharindoko/json-serverless) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![DeepScan grade](https://deepscan.io/api/teams/8861/projects/11081/branches/160781/badge/grade.svg)](https://deepscan.io/dashboard#view=project\u0026tid=8861\u0026pid=11081\u0026bid=160781)\u003ca href=\"https://codeclimate.com/github/pharindoko/json-serverless/maintainability\"\u003e\u003c/a\u003e ![aws provider](https://img.shields.io/badge/provider-AWS-orange?logo=amazon-aws\u0026color=ff9900)\n\n![Trailer](docs/jsonsls-local.gif)\n\n## Features\n\n- Create a REST API out of a [json-server](https://github.com/typicode/json-server) compatible JSON-File\n- Swagger UI integrated (Swagger spec automatically generated)\n- GrapqhiQL integrated (Graphql schema automatically generated)\n- Additional JSON File validations at startup\n- Readonly or Read/Write Mode (file stored in S3 Bucket)\n- Deployment in AWS:\n  - [Own CLI to test locally and immediately deploy it to the cloud](https://github.com/pharindoko/json-serverless/tree/master/packages/cli)\n  - Deployed in AWS cloud within Minutes by a single command\n  - Almost **zero costs** (First million requests for Lambda are free)\n  - Less maintenance as the deployed solution runs **serverless**\n- Security:\n  - Secured with https by default.\n  - Optional: Use a generated API Key\n- Customization:\n  - This solution written in **Typescript** can be easily extended for additional enhanced scenarios\n    - adding user authentication ([Here`s an example](https://github.com/pharindoko/jsonsls-vue-cognito-demo))\n    - own custom domain\n    - additional routes etc.\n\n## QuickStart \n\n### 1. Install Solution\n\n```bash\nnpm i -g json-serverless\n```\n\n### 2. Run local\n\n1. create a jsonserver-file sample e.g. db.json\n\n   ```\n   {\n       \"posts\": [\n         { \"id\": 1, \"title\": \"json-server\", \"author\": \"typicode\" },\n         { \"id\": 2, \"title\": \"test\", \"author\": \"yourAuthor\" }\n       ],\n       \"comments\": [\n         { \"id\": 1, \"body\": \"some comment\", \"postId\": 1 }\n       ],\n       \"profile\": { \"name\": \"typicode\" }\n   }\n   ```\n\n2) execute command\n\n   ```\n   jsonsls run db.json\n   ```\n\n### 3. Deploy api to AWS\n\n1. Verify that you have a AWS account and set appropriate credentials\n2. execute command\n\n   ```bash\n   jsonsls create-stack db.json {optional: STAGE}\n   ```\n\n- a stack template folder will be created that contains the deployable serverless framework solution.\n  \u003cb\u003eYou can use the serverless cli in this stack template folder.\u003c/b\u003e\n\n* When the deployment was successful you can see following output\n\n  \u003cpre\u003e\n  \u003ccode\u003e\n  Service Information\n  service: serverless-json-server\n  stage: dev\n  region: eu-central-1\n  stack: serverless-json-server-dev\n  api keys:\n    serverless-json-server.dev: \u003cb\u003e{API-KEY}\u003c/b\u003e\n  endpoints:\n    ANY - \u003cb\u003ehttps://xxxxxx.execute-api.eu-central-1.amazonaws.com/dev/ \u003c== {ENDPOINTURL}\u003c/b\u003e\n    ANY - https://xxxxxxx.eu-central-1.amazonaws.com/dev/{proxy+}\n  functions:\n    app: serverless-json-server-dev-app\n  layers:\n    None\n  Serverless: Removing old service artifacts from S3...\n  \u003c/pre\u003e\u003c/code\u003e\n\n### 4. Test your Api\n\nOpen the {ENDPOINTURL}: https://xxxxxx.execute-api.eu-central-1.amazonaws.com/dev/ that you received as output\n\n| Features              | Relative Path | Sample with Endpoint                                                |\n| --------------------- | ------------- | ------------------------------------------------------------------- |\n| Swagger UI            | /ui           | https://xxxxxx.execute-api.eu-central-1.amazonaws.com/dev/ui        |\n| Swagger Specification | /api-spec     | https://xxxxxx.execute-api.eu-central-1.amazonaws.com/dev/api-spec  |\n| GraphiQL              | /graphql      | https://xxxxxx.execute-api.eu-central-1.amazonaws.com/dev/graphql   |\n| API Routes            | /api/{routes} | https://xxxxxx.execute-api.eu-central-1.amazonaws.com/dev/api/posts |\n\n**MIND**: If you have set enableApiKeyAuth to true =\u003e [SwaggerUI](#Cannot-use-Swagger-UI-when-enableApiKeyAuth-is-true)\n)\n\n#### With Curl\n\n1. replace the url with the url provided by serverless (see above)\n2. replace the {API-KEY} with the key you get from serverless (see above)\n3. replace {route} at the end of the url e.g. with posts (default value)\n\nDefault Schema:\n\n```bash\nDefault route is posts: (see db.json)\ncurl -H \"Content-Type: application/json\" https://xxxxxx.execute-api.eu-central-1.amazonaws.com/dev/api/posts\n\n# or another route given in db.json file\ncurl -H \"Content-Type: application/json\" https://xxxxxx.execute-api.eu-central-1.amazonaws.com/dev/api/{route}\n\n# with enableApiKeyAuth=true\ncurl -H \"x-api-key: {API-KEY}\" -H \"Content-Type: application/json\" https://xxxxxx.execute-api.eu-central-1.amazonaws.com/dev/api/{route}\n\n```\n\nWhat`s my {route} ? -\u003e see [json-server documentation](https://github.com/typicode/json-server)\n\n## Architecture in AWS\n\n![Architecture](docs/json-serverless.png)\n\n## Customization\n\n### Examples\n\nPlease have a look at this example to see how you can add own middleware and authentication.  \nhttps://github.com/pharindoko/jsonsls-vue-cognito-demo\n\n### Update content of db.json\n\n1. update local db.json file in root directory with new values\n2. re-deploy the stack via serverless framework\n\n   ```bash\n    jsonsls update-stack\n   ```\n\n3. delete db.json file in S3 Bucket\n4. Make a GET request against the root url https://xxxxxx.execute-api.eu-central-1.amazonaws.com/dev/api\n\n```bash\ncurl -H \"Content-Type: application/json\" https://xxxxxx.execute-api.eu-central-1.amazonaws.com/dev/api\n\n# with enableApiKeyAuth=true\ncurl -H \"x-api-key: {API-KEY}\" -H \"Content-Type: application/json\" https://xxxxxx.execute-api.eu-central-1.amazonaws.com/dev/api/{route}\n\n\n```\n\n=\u003e With the next request a new db.json file will be created in the S3 Bucket\n\n### Adapt settings (in the stackfolder you can find this config under ./config/appconfig.json)\n\n| Attribute            | Description                                                              | Type    | Default |\n| -------------------- | ------------------------------------------------------------------------ | ------- | ------- |\n| readOnly             | Make API readonly - all API - write operations are forbidden (http 403)) | string  | false   |\n| enableApiKeyAuth     | Make your routes private by using an additional ApiKey                   | boolean | false   |\n| enableJSONValidation | validate JSON file at start                                              | boolean | true    |\n| enableSwagger        | enable or disable Swagger (and related Graphql) features                 | boolean | true    |\n\n## Used Packages\n\n- [json-server](https://github.com/typicode/json-server)\n- [serverless framework](https://serverless.com/)\n- [serverless http](https://github.com/dougmoscrop/serverless-http)\n- [lowdb-adapter-aws-s3](https://github.com/nicekiwi/lowdb-adapter-aws-s3)\n\n## Components\n\n- [NodeJS 10](https://nodejs.org/en/about/)\n- [AWS API Gateway](https://aws.amazon.com/api-gateway/)\n- [AWS Lambda](https://aws.amazon.com/lambda/features/)\n- [AWS S3](https://aws.amazon.com/s3/)\n\n## Develop \u0026 Contribute\n\nPRs are welcome!\n\n### Overview\n\nPlease have a look into the makefile to get the understanding how this construct is built.\nThere are components managed: (under /packages)\n\n- cli\n  - built with oclif\n  - main purpose is to enease the usage of the tool\n  - creates a stack folder out of the template package\n- server\n  - the core component of the solution\n  - has json server implemented under the hood\n  - components will be injected from outside into the library (storageadapter, swagger)\n  - can be customized and used without the other parts (could be deployed with docker)\n  - library can be used standalone as well ([see example](https://github.com/pharindoko/json-serverless/tree/master/examples/simple-server))\n- template\n\n  - a serverless framework template\n  - can be used standalone without the cli\n\n    ```bash\n      serverless create --template-url https://github.com/pharindoko/json-serverless/tree/master/packages/template\n\n      npm i\n      npm run build\n      sls deploy\n      sls offline\n    ```\n\n### Installation\n\n```\nmake install\n```\n\nLerna will be used to manage the monorepo`s dependencies.\n\n```\nlerna bootstrap\n```\n\n### Start the server component\n\n```bash\nmake start-server\n```\n\nthe json file will be loaded directly from your local filesystem. No AWS access is needed.\n\n### Start the template component\n\nThis part is using the serverless offline and is close to how the solution behaves in the cloud.\n\n```bash\nmake start-template\n```\n\nthe json file will be loaded directly from your local filesystem. No AWS access is needed.\n\n### Start the cli component\n\nyou should see a direct output of all local endpoints.\n\n```bash\nmake start-cli\n```\n\nthe json file will be loaded directly from your local filesystem. No AWS access is needed.\n\n## FAQ\n\n### Cannot use Swagger UI when enableApiKeyAuth is true\n\nThe apiKey is set in AWS API Gateway. This means all requests (even the standard route) need to use the API-KEY.\n\nIf you want to see the Swagger UI you need to add a plugin e.g. ModHeader to Chrome and add the needed headers:\n\n- Content-Type: application/json\n- x-api-key: {provided by sls info in the output after deployment}\n\n![ModHeader](docs/header.png)\n\n### I forgot the API-KEY I have set\n\nEnsure you have credentials for AWS set.\n\n```bash\nsls info\n```\n\n### Destroy the stack in the cloud\n\n```bash\nsls remove\n```\n\n### I deployed the solution but I get back a http 500 error\n\nCheck Cloudwatch Logs in AWS - the issue should be describe there. Log has the same name as the stack that has been created.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharindoko%2Fjson-serverless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpharindoko%2Fjson-serverless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharindoko%2Fjson-serverless/lists"}