npm.io
2.0.0 • Published 5 months ago

kickable

Licence
ISC
Version
2.0.0
Deps
4
Size
22 kB
Vulns
0
Weekly
0
Stars
1

kickable

kickable is a microservice built to answer the age old question, "Can I Kick It?"

What is a kickable?

Currently only the word "it" is kickable.

NPM Build Coverage Vulnerabilities
npm version CI coverage Known Vulnerabilities
downloads Coverage Status

Requirements

Node.js 22+

Usage

$ npm ci
$ npm run build
$ npm start

The service listens on port 3000 by default. Set the PORT environment variable to override:

$ PORT=8080 npm start

Development

Type check

$ npm run typecheck

Lint

$ npm run lint
Build
$ npm run build
Test
$ npm test
Coverage
$ npm run test:coverage

API

GET /healthz

Returns 200 OK. Used by load balancers and orchestrators to verify liveness.

GET /kick/:it

Returns true if :it is kickable, otherwise false.

Example:

$ curl http://localhost:3000/kick/it
true

$ curl http://localhost:3000/kick/sky
false
What's next?
  • Case insensitivity
  • Support for configuring kickable items other than it
  • Return true if the item is a known kickable noun (ball, wall, door); otherwise false (sky, feelings, comments)
Maintainers

Hector Gray (Twitter: @defstream)

Contribute

Pull Requests welcome. Please make sure all checks pass:

$ npm run typecheck
$ npm run lint
$ npm test

Please submit Github issues for any feature enhancements, bugs or documentation problems.

License

MIT