Skip to content

Julien-Decoen/rest-api-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting started

Install packages

npm i

Start Api

npm run start-api

Start Api which response with delay (10s)

npm run delay-api

Start Server

# Dev
npm run watch
npm run dev

# Prod
npm run start

Api Routes

To load the last 20 stock value samples :

$> curl http://localhost:3000/stocks?_limit=20

To load all available stock value samples :

$> curl http://localhost:3000/stocks

More exemple : here

Queries return a JSON array of stock samples :

[
  {
    timestamp: "2018-11-08T14:47:41.157Z",
    index: 0,
    stocks: "17.482"
  },
  {
    timestamp: "2018-11-07T14:47:41.158Z",
    index: 1,
    stocks: "18.335"
  }
];

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published