Deno Web API

Deno Web API is a Web API written using Deno, an upcoming JavaScript and TypeScript runtime that was created by Ryan Dahl, the same person who created NodeJS. To learn more about Deno, check out Ryan's talk where he discusses some of the missteps with Node and some of the features of Deno that correct these missteps. Also check out the Offical Deno Page, and check out my tutorial on creating Web APIs using Deno.


List of API Routes:


/echo/{text}

Description

Echos the text provided in the URL parameter

Examples

/echo/hello -> hello

/echo/world -> world


/add/{num1}/{num2}

Description

Adds two numbers provided in the URL parameters

Examples

/add/1/2 -> 3

/add/3/4 -> 7


/sub/{num1}/{num2}

Description

Subtracts two numbers provided in the URL parameters

Examples

/sub/2/1 -> 1

/sub/5/2 -> 3


/mul/{num1}/{num2}

Description

Multiplies two numbers provided in the URL parameters

Examples

/mul/3/4 -> 12

/mul/5/4 -> 20


/div/{num1}/{num2}

Description

Divides two numbers provided in the URL parameters

Examples

/div/6/3 -> 2

/div/9/2 -> 4.5


/pow/{num1}/{num2}

Description

Raises the first number to the power of the second number provided in the URL parameters

Examples

/pow/2/3 -> 8

/pow/5/5 -> 125


/sqa/{num1}

Description

Squares the number provided in the URL parameter

Examples

/sqa/3 -> 9

/sqa/4 -> 16


/sqr/{num1}

Description

Square roots the number provided in the URL parameter

Examples

/sqr/4 -> 2

/sqr/25 -> 5


/ran

Description

Returns a random number

Examples

/ran -> 0.6627687247203764

/ran -> 0.15828265059193136