{"id":15457484,"url":"https://github.com/rishi-raj-jain/edgio-commerce-api-example","last_synced_at":"2025-09-23T18:02:03.418Z","repository":{"id":37092166,"uuid":"494228817","full_name":"rishi-raj-jain/edgio-commerce-api-example","owner":"rishi-raj-jain","description":"A demo showing off EdgeJS app as a mock e-commerce API with Edgio","archived":false,"fork":false,"pushed_at":"2023-02-14T14:51:21.000Z","size":94758,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-12T13:33:27.536Z","etag":null,"topics":["caching","cdn","ecommerce","edge-computing","edgejs","layer0","serverless","static"],"latest_commit_sha":null,"homepage":"https://edgio-community-ecommerce-api-example-default.layer0-limelight.link/products/all","language":"JavaScript","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/rishi-raj-jain.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-19T21:04:03.000Z","updated_at":"2023-02-14T14:49:55.000Z","dependencies_parsed_at":"2024-10-05T13:20:43.177Z","dependency_job_id":"e5514f40-d81f-465b-8dea-2a882de684f2","html_url":"https://github.com/rishi-raj-jain/edgio-commerce-api-example","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/rishi-raj-jain%2Fedgio-commerce-api-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishi-raj-jain%2Fedgio-commerce-api-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishi-raj-jain%2Fedgio-commerce-api-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishi-raj-jain%2Fedgio-commerce-api-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rishi-raj-jain","download_url":"https://codeload.github.com/rishi-raj-jain/edgio-commerce-api-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246635986,"owners_count":20809333,"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":["caching","cdn","ecommerce","edge-computing","edgejs","layer0","serverless","static"],"created_at":"2024-10-01T22:45:42.609Z","updated_at":"2025-09-23T18:01:58.363Z","avatar_url":"https://github.com/rishi-raj-jain.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Creating APIs with Serverless Functions by Edgio: A Fake E-Commerce API\n\n[![Deploy To Edgio](https://docs.edg.io/button.svg)](https://app.layer0.co/deploy?repo=https://github.com/rishi-raj-jain/edgio-commerce-api-example)\n\n![Creating APIs with Serverless Functions by Edgio: A Fake E-Commerce API](https://raw.githubusercontent.com/rishi-raj-jain/layer0-ecommmerce-api-example/master/Layer0-Serverless-Functions.png)\n\n[Edgio Serverless Functions](https://docs.edg.io/guides/serverless_functions) allow you to create APIs without using a Javascript framework. This example is to create a free online REST API that you can use whenever you need Pseudo-real data for your e-commerce without running any server-side code.\n\n## Resources\n\nThere are 3 main resources need in e-commerce prototypes:\n\n- All Products: /products/all\n- Specific Product: /products/:slug\n- Image(s) of the products: /product-images/:slug\n\n## How To\n\nOne can fetch data with any kind of methods you know(fetch API, Axios, JQuery AJAX, etc.)\n\n### Get all products\n```js\nfetch(\"https://edgio-community-ecommerce-api-example-default.layer0-limelight.link/products/all\")\n  .then((res) =\u003e res.json())\n  .then((res) =\u003e console.log(res))\n```\n\n### Get a single product\n```js\nfetch(\"https://edgio-community-ecommerce-api-example-default.layer0-limelight.link/products/next-js-enamel-mug\")\n  .then((res) =\u003e res.json())\n  .then((res) =\u003e console.log(res))\n```\n\n### Get all images of a product\n```js\nfetch(\"https://edgio-community-ecommerce-api-example-default.layer0-limelight.link/product-images/next-js-enamel-mug\")\n  .then((res) =\u003e res.json())\n  .then((res) =\u003e console.log(res))\n```\n\n## [Contributing] Getting Started\n\n### Clone This Repo\n\nUse `git clone https://github.com/rishi-raj-jain/edgio-commerce-api-example.git` to get the files within this repository onto your local machine.\n\n### Install dependencies\n\nOn the command line, in the project root directory, run the following command:\n\n```bash\nnpm install\n```\n\n### Run Serverless Functions locally on Edgio\n\n```bash\nnode scrape.js \u0026\u0026 edgio dev\n```\n\n### Testing production build locally with Edgio\n\n```bash\nedgio build \u0026\u0026 edgio run --production\n```\n\nSetting --production runs your app exactly as it will be uploaded to the Edgio cloud using serverless-offline.\n\n## Deploying to Edgio\n\nDeploying requires an account on Edgio. [Sign up here for free](https://app.layer0.co/signup). Once you have an account, you can deploy to Edgio by running the following in the root folder of your project:\n\n```bash\nedgio deploy\n```\n\nSee [deploying](https://docs.edg.io/guides/deploying) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishi-raj-jain%2Fedgio-commerce-api-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frishi-raj-jain%2Fedgio-commerce-api-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishi-raj-jain%2Fedgio-commerce-api-example/lists"}