An open API service indexing awesome lists of open source software.

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

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)