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 installRun
Start the server on port 3000:
npm startDeveloper mode (auto-restart):
npm run devExamples
Query for a lizard:
curl http://localhost:3000/isit/lizardExpected body:
absolutely yes 🦎
Query for something else:
curl http://localhost:3000/isit/catExpected body:
false
Linting
Run ESLint across the project:
npm run lintTesting
To run the tests, run:
npm testWe have a lot of tests, and they are a tad-bit slow. They take about 30 seconds to run.