Skip to content

GTamp/loftylizard

 
 

Repository files navigation

isit-service

Small node microservice answering whether something is a lizard.

Behaviour

  • GET /isit/:thing — if :thing equals lizard (case-insensitive), the service responds with the text absolutely yes 🦎.
  • For anything else the service responds with the text false.

Install

Run these commands in a shell:

# install dependencies
npm install

Run

Start the server on port 3000:

npm start

Developer mode (auto-restart):

npm run dev

Examples

Query for a lizard:

curl http://localhost:3000/isit/lizard

Expected body:

absolutely yes 🦎

Query for something else:

curl http://localhost:3000/isit/cat

Expected body:

false

Linting

Run ESLint across the project:

npm run lint

Testing

To run the tests, run:

npm test

We have a lot of tests, and they are a tad-bit slow. They take about 30 seconds to run.

About

Please don't look too deeply into this repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 89.5%
  • Dockerfile 10.5%