https://github.com/gabepublic/api-fetch-website
Demonstrate a simple website fetching "random users" JSON data from the public API
https://github.com/gabepublic/api-fetch-website
api api-fetch http-server nodejs website
Last synced: 8 months ago
JSON representation
Demonstrate a simple website fetching "random users" JSON data from the public API
- Host: GitHub
- URL: https://github.com/gabepublic/api-fetch-website
- Owner: gabepublic
- License: apache-2.0
- Created: 2022-08-09T17:33:48.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-09T23:27:47.000Z (almost 4 years ago)
- Last Synced: 2025-01-12T09:44:29.629Z (over 1 year ago)
- Topics: api, api-fetch, http-server, nodejs, website
- Language: HTML
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# api-fetch-website
Demonstrate a simple website getting the "random users" JSON data from the
public REST API using the Javascript Fetch library.
## Prerequisite
- [Node.js & NPM](https://digitalcompanion.gitbook.io/home/setup/node.js)
## Setup
- Clone this repo
- The URI of the public API (random users): https://randomuser.me/api/?results=50
## Develop
- Run the Http server
```
npx serve src -l 8000
```
## Deploy
- Register an account with [Render.com](https://render.com/)
- Render documentation for [Static Sites](https://render.com/docs/static-sites)
- Deployment by linking this Github repo to Render
- Note: Static sites on Render are free, with no cost at all unless the
traffics go above 100 GB of bandwidth per month.
## References
- Youtube [Javascript Fetch Api Example](https://www.youtube.com/watch?v=0bec1BmeY4c&t=33s)