From 3fc86a9dd08837ef7b947a90257e0deed70f7b64 Mon Sep 17 00:00:00 2001 From: Oliver Akins Date: Sun, 25 Dec 2022 17:09:32 -0600 Subject: [PATCH] backup 2022-12-25 --- site/index.html | 12 ++++++++++++ site/style.css | 0 src/endpoints/channelInfo.ts | 10 ++++++++++ src/endpoints/createChannel.ts | 10 ++++++++++ src/endpoints/createCounter.ts | 10 ++++++++++ src/endpoints/deleteCounter.ts | 10 ++++++++++ src/endpoints/listChannels.ts | 10 ++++++++++ 7 files changed, 62 insertions(+) create mode 100644 site/index.html create mode 100644 site/style.css create mode 100644 src/endpoints/channelInfo.ts create mode 100644 src/endpoints/createChannel.ts create mode 100644 src/endpoints/createCounter.ts create mode 100644 src/endpoints/deleteCounter.ts create mode 100644 src/endpoints/listChannels.ts 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