Calculator

Calculate all the extraordinary problems of mathematics with this rest api.

Demo

Here's a codepen demo page using this api: link alt text

install

  git clone https://github.com/omidfi/calculator.git
  cd calculator
  npm install
  node server.js

Tests

npm test

Usage

To add 4 and 53 together:

  curl -H "Content-Type: application/json" -X POST -d '{"number1":4,"number2":53}' http://localhost:8000/add

Notes

HTTP requests are bread and buttee of web developments. If you write node, it's highly recommended to check this article

https://nodejs.org/en/docs/guides/anatomy-of-an-http-transaction/