diff --git a/src/routes/chat/[chat]/+page.js b/src/routes/chat/[chat]/+page.js
new file mode 100644
index 0000000..659278a
--- /dev/null
+++ b/src/routes/chat/[chat]/+page.js
@@ -0,0 +1,11 @@
+import { redirect } from '@sveltejs/kit';
+
+/** @type {import('./$types').PageLoad} */
+export async function load({ fetch, params, url }) {
+
+ var id = params.chat;
+
+ const token = await fetch(`/api/token`).then(x => x.json());
+
+ return {id, token: token.token};
+}
\ No newline at end of file
diff --git a/src/routes/chat/[chat]/+page.svelte b/src/routes/chat/[chat]/+page.svelte
new file mode 100644
index 0000000..ee12698
--- /dev/null
+++ b/src/routes/chat/[chat]/+page.svelte
@@ -0,0 +1,100 @@
+
+
+
+
+
+ {#each messages as message}
+
+ {/each}
+
+
+
\ No newline at end of file
diff --git a/src/routes/new_post/+page.svelte b/src/routes/new_post/+page.svelte
index 2919b30..4c8c589 100644
--- a/src/routes/new_post/+page.svelte
+++ b/src/routes/new_post/+page.svelte
@@ -90,6 +90,9 @@
#post replies to a post by ID
+
+ %chat links to a chatroom
+
*x* produces italic text
diff --git a/svelte.config.js b/svelte.config.js
index 6bfb3c4..cfece53 100644
--- a/svelte.config.js
+++ b/svelte.config.js
@@ -1,10 +1,10 @@
-import adapter from '@sveltejs/adapter-node';
+import adapter from '@sveltejs/adapter-node'
/** @type {import('@sveltejs/kit').Config} */
const config = {
- kit: {
- adapter: adapter()
- }
-};
+ kit: {
+ adapter: adapter(),
+ }
+}
-export default config;
+export default config
\ No newline at end of file
diff --git a/vite.config.js b/vite.config.js
index 11f6c22..19262b8 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -1,7 +1,15 @@
import { sveltekit } from '@sveltejs/kit/vite';
+
+import { configureServer } from './src/chat/chat.js';
+
+const webSocketServer = {
+ name: 'webSocketServer',
+ configureServer
+}
+
const config = {
- plugins: [sveltekit()]
+ plugins: [sveltekit(),webSocketServer]
};
export default config;