Small node microservice answering whether something is a lizard.
Behaviour
GET /isit/:thing— if:thingequalslizard(case-insensitive), the service responds with the textabsolutely 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.