Just a stupid api
Check if the number is even
/api/isEven/41
Check if the number is odd
/api/isOdd/24
Check if its a number
/api/isNumber/12
Adds two number
/api/add?firstNum=5&secondNum=10
Subtracts two number
/api/subtract?firstNum=5&secondNum=10
Multiplies two number
/api/multiply?firstNum=5&secondNum=10
Divides two number
/api/divide?firstNum=5&secondNum=10
All of the endpoints follow the similar output
Example url:
/api/add?firstNum=5&secondNum=10
SUCCESS:
{
"result": 15
}
Example url:
/api/add?firstNum=hi&secondNum=10
ERROR:
{
"error": "INVALID_QUERY_TYPE",
"message": "firstNum cannot have any letters or special characters"
}
git clone https://github.com/qxb3/stupid-apis.git
cd stupid-apis
yarn
npm install #If using npm
Running the project
yarn start
npm run start #If using npm
Running development
yarn dev
npm run dev #If using npm
Want to contribute? just make a pr :)