Skip to content

API that returns an integer value in a specific range.

License

Notifications You must be signed in to change notification settings

medeiser/randomizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Randomizer

API that returns an integer value in a specific range.

Instalation

Parrot requires Node.js to run. It also uses nodemon for development.

Install dependencies:

$ npm install

Run dev (uses nodemon):

$ npm run dev

Run production:

$ npm start

Docker

An official image is available at Docker Hub

A docker configuration file is provided so that an image can also be built.

Build docker image:

$ docker build -t randomizer .

Running docker image:

$ docker run --rm -ti -p 3000:3000 randomizer

Usage

Randomizer can be called with min, max or no parameters.

Examples:

$ curl -X GET 'http://localhost:3000/random'
2562129742708042
$ curl -X GET 'http://localhost:3000/random?max=10'
3
$ curl -X GET 'http://localhost:3000/random?max=10&min=5'
8

About

API that returns an integer value in a specific range.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published