Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1.42 KB

readme.md

File metadata and controls

25 lines (16 loc) · 1.42 KB

Explaining how to use Axios library

Using the JSON data from JSONPlaceholder and Ironhack Movie Characters

Explaining how to setup a own API server in Express

Setup

  1. start mongo server
  2. Import the whole country list by running: node ./bin/seed.js in terminal.

ROUTES

// makes api GET calls to a remote server with help of Axios: http://localhost:3000/posts/ // list all posts from the source (jsonplaceholder.typicode.com/posts) http://localhost:3000/posts/1 // list one unique post by id from the source (jsonplaceholder.typicode.com/posts/1)

// makes api GET calls to a remote server with help of Axios: http://localhost:3000/characters/ // list all characters from the source http://localhost:3000/characters/1 // list one unique character by id from the source

// Serve json data with help of express local http://localhost:3000/api/countries // list all countries in the database you have on your machine. http://localhost:3000/api/countries/SE // show one unique country by country code.