Decouple client from server
Add Vite dependency and remove server side rendering to make it
possible to run the client independently.
Remove webpack config, replace with the `Vite` build tool.
GitLab: #55
Change-Id: I3a05d2e86cf6cb0ab91e77b3696f393132137575
diff --git a/common/package.json b/common/package.json
index 78e2bb3..975c61d 100644
--- a/common/package.json
+++ b/common/package.json
@@ -18,8 +18,6 @@
"format:check": "prettier --check src"
},
"dependencies": {
- "@types/express-session": "^1.17.5",
- "@types/socket.io": "^3.0.2",
"typescript": "^4.8.4"
}
}
diff --git a/common/src/Conversation.ts b/common/src/Conversation.ts
index 01b70cd..7b55de9 100644
--- a/common/src/Conversation.ts
+++ b/common/src/Conversation.ts
@@ -15,10 +15,8 @@
* License along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
-import { Socket } from 'socket.io';
-
import { Contact } from './Contact.js';
-import { PromiseExecutor, Session } from './util.js';
+import { PromiseExecutor } from './util.js';
export interface ConversationMember {
contact: Contact;
@@ -33,8 +31,8 @@
type ConversationListeners = Record<
string,
{
- socket: Socket;
- session: Session;
+ socket: any; // TODO: Improve typing
+ session: any;
}
>;
diff --git a/common/src/util.ts b/common/src/util.ts
index c814ba1..ba1e923 100644
--- a/common/src/util.ts
+++ b/common/src/util.ts
@@ -15,8 +15,6 @@
* License along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
-import { Session as ISession } from 'express-session';
-
export interface PromiseExecutor<T> {
resolve: (value: T) => void;
reject: (reason?: any) => void;
@@ -32,8 +30,3 @@
name?: string;
address?: string;
}
-
-export interface Session extends ISession {
- socketId: string;
- conversation: any;
-}