Skip to content

EthanHorizons/Quote-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CS-374-MicroService

Description:

A micro service that will deliver random nature quotes, or quotes based on select vibes The developer can specify between different feelings of quotes by supplying the right path to get a random quote of that vibe.

Requires:

  • Node
  • Express: user needs to run 'npm express'

Requests:

First the user needs run the server by putting 'run quotes.js' in terminal

For a random quote:

For a random quote from a with a specific feeling:

Example Requests & Response

For a random quote:

fetch('http://localhost:3001/quotesRandom', {
  method: 'GET',
  headers: {
      'Content-Type: 'application/json',
  }
})
  .then(response => response.json())
  .then(data => {
      const quote = data.quote;
      console.log("Random Quote:", quote);
    });

For a quote that feels adventurous:

fetch('http://localhost:3001/quotes/adventurous', {
  method: 'GET',
  headers: {
      'Content-Type: 'application/json',
  }
})
  .then(response => response.json())
  .then(data => {
      const quote = data.quote;
      console.log("Adventurous Quote:", quote);
    });

image

About

A micro service that will deliver random nature quotes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors