Refactor project for typescript support

Update and move tsconfig.json from client/ to the root folder.
Update docker-compose.yml and .dockerignore.
Update client/webpack.config.js for better typescript support.

Change-Id: I3b0cc88f7c828dc5bfa5ac129352bf3d40189af3
diff --git a/package.json b/package.json
index 96ed873..f8e046a 100644
--- a/package.json
+++ b/package.json
@@ -1,9 +1,20 @@
 {
   "name": "jami-web-server",
-  "type": "module",
   "version": "1.0.0",
   "description": "Jaas Web API that handles client requests to Jami daemon",
-  "main": "index.js",
+  "license": "ISC",
+  "author": "Larbi Gharib",
+  "type": "module",
+  "main": "app.ts",
+  "scripts": {
+    "build": "npm run build-client",
+    "build:prod": "tsc && NODE_ENV=production npm run build-client",
+    "build-client": "cd client && webpack",
+    "clean": "rm -rf dist client/dist",
+    "clean-all": "npm run clean && rm -rf node_modules client/node_modules",
+    "start": "nodemon",
+    "start:prod": "NODE_ENV=production node dist/app.js"
+  },
   "dependencies": {
     "@sentry/node": "^7.13.0",
     "@sentry/tracing": "^7.13.0",
@@ -35,15 +46,9 @@
     "llnode": "^4.0.0",
     "nodemon": "^2.0.20",
     "raw-loader": "^4.0.2",
+    "ts-node": "^10.9.1",
+    "typescript": "^4.8.3",
     "webpack-dev-middleware": "^5.3.3",
     "webpack-hot-middleware": "^2.25.2"
-  },
-  "scripts": {
-    "build": "cd client && npx webpack",
-    "build-dev": "cd client && npx webpack --mode development",
-    "start": "node app.js",
-    "start-dev": "nodemon app.js"
-  },
-  "author": "Larbi Gharib",
-  "license": "ISC"
+  }
 }