diff --git a/site/index.html b/site/index.html new file mode 100644 index 0000000..460c2df --- /dev/null +++ b/site/index.html @@ -0,0 +1,12 @@ + + + + + + + Counter Manager + + + Hello There + + \ No newline at end of file diff --git a/site/style.css b/site/style.css new file mode 100644 index 0000000..e69de29 diff --git a/src/endpoints/channelInfo.ts b/src/endpoints/channelInfo.ts new file mode 100644 index 0000000..ec50483 --- /dev/null +++ b/src/endpoints/channelInfo.ts @@ -0,0 +1,10 @@ +import { ServerRoute } from "@hapi/hapi"; + +const route: ServerRoute = { + method: `GET`, path: `/channels/{channel}`, + options: {}, + async handler() { + return `pong!`; + }, +}; +export default route; \ No newline at end of file diff --git a/src/endpoints/createChannel.ts b/src/endpoints/createChannel.ts new file mode 100644 index 0000000..6a8b045 --- /dev/null +++ b/src/endpoints/createChannel.ts @@ -0,0 +1,10 @@ +import { ServerRoute } from "@hapi/hapi"; + +const route: ServerRoute = { + method: `POST`, path: `/channels`, + options: {}, + async handler() { + return `pong!`; + }, +}; +export default route; \ No newline at end of file diff --git a/src/endpoints/createCounter.ts b/src/endpoints/createCounter.ts new file mode 100644 index 0000000..20f3f4b --- /dev/null +++ b/src/endpoints/createCounter.ts @@ -0,0 +1,10 @@ +import { ServerRoute } from "@hapi/hapi"; + +const route: ServerRoute = { + method: `POST`, path: `/channels/{channel}/counters`, + options: {}, + async handler() { + return `pong!`; + }, +}; +export default route; \ No newline at end of file diff --git a/src/endpoints/deleteCounter.ts b/src/endpoints/deleteCounter.ts new file mode 100644 index 0000000..69e8a2b --- /dev/null +++ b/src/endpoints/deleteCounter.ts @@ -0,0 +1,10 @@ +import { ServerRoute } from "@hapi/hapi"; + +const route: ServerRoute = { + method: `DELETE`, path: `/channels/{channel}/counters/{counter}`, + options: {}, + async handler() { + return `pong!`; + }, +}; +export default route; \ No newline at end of file diff --git a/src/endpoints/listChannels.ts b/src/endpoints/listChannels.ts new file mode 100644 index 0000000..ab9e630 --- /dev/null +++ b/src/endpoints/listChannels.ts @@ -0,0 +1,10 @@ +import { ServerRoute } from "@hapi/hapi"; + +const route: ServerRoute = { + method: `GET`, path: `/channels`, + options: {}, + async handler() { + return `pong!`; + }, +}; +export default route; \ No newline at end of file