Skip to content

barhoring/fake-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

fake-server

A tiny trivia 🤔 server. Served with My JSON Server

in dev tools or .js file

fetch('https://my-json-server.typicode.com/barhoring/fake-server/questions/1')
  .then(response => response.json())
  .then(json => console.log(json))

results to

    {
      "id": 1,
      "content": "Which two metals is pewter made from?",
      "options": [
        "Tin and lead",
        "Lead and coper",
        "Lead and gold",
        "Tin and gold"
      ]
    }

The first element in options is the correct answer, so shuffle options.

About

A tiny trivia 🤔 server. Served with My JSON Server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published