Bladeren bron

Add env file to help installation

Jeremie Pardou-Piquemal 3 jaren geleden
bovenliggende
commit
11f90f652d
8 gewijzigde bestanden met toevoegingen van 315 en 83 verwijderingen
  1. 5 24
      .env.dist
  2. 2 0
      .gitignore
  3. 56 18
      README.md
  4. 33 0
      backend/.env.dist
  5. 205 34
      backend/package-lock.json
  6. 6 6
      backend/package.json
  7. 7 0
      backend/site.dist.json
  8. 1 1
      package.json

+ 5 - 24
.env.dist

@@ -1,31 +1,12 @@
-##### Font ####
+##### Front ####
 
 # API URL
-REACT_APP_API_ENDPOINT=http://localhost:3001/
+REACT_APP_API_ENDPOINT=http://localhost:3001
 
 # Socket configuration
-REACT_APP_SOCKET_URL=https://localhost:3001/
-REACT_APP_SOCKET_PATH=
+REACT_APP_SOCKET_URL=http://localhost:3001
+REACT_APP_SOCKET_PATH=/socket.io
 
-# Game list URL
-REACT_APP_GAMELIST_URL=http://localhost:8080/gameList.json
-
-# Set to 1 to remove Welcome (debug only)
+# Set to 1 to remove Welcome dialog
 REACT_APP_NO_WELCOME=0
 
-#### BACK ####
-
-# Server API and socket port
-SERVER_PORT=3001
-SERVER_HOST=localhost
-
-FILE_STORAGE=memory # or disk or s3
-DISK_DESTINATION= # for disk storage
-
-# For s3 storage
-S3_ACCESS_KEY=
-S3_SECRET_KEY=
-S3_ENDPOINT=
-S3_BUCKET=
-
-

+ 2 - 0
.gitignore

@@ -31,3 +31,5 @@ yarn-error.log*
 
 cypress/videos
 archives/
+
+site.json

+ 56 - 18
README.md

@@ -88,44 +88,82 @@ You can drag'n'drop image from your desktop to the board to use them in Airboard
 
 * Open source web application,
 * Made with React and Socket.io,
+* Use recoiljs as state management,
 * Client to client driven architecture.
   
-## Installation for developpers
+## Installation instructions
 
-### Client
+This is the procedure to install Airboargame application from scratch for
+development purpose.
+You need a recent node version. You can (and should) use [nvm](https://github.com/nvm-sh/nvm)
+to initialize your environment.
+
+### Backend
+
+First you need to install and start the server part of the application.
+The server code use [ricochetjs](https://github.com/jrmi/ricochetjs). A local
+instance is installed and can be started but you can use your own instance.
 
-You need a recent node version. You can use nvm to initialize your environment.
-Then, execute
+To proceed, execute:
 
 ```sh
-npm ci # To install dependencies
+cd backend
+npm ci
+cp site.dist.json site.json
+cp .env.dist .env
 ```
 
-Configure the environement:
+Generate an encrytion key:
 
-Copy the `.env.dist` file without the `.dist` extension and edit it to fit your
-needs.
+```sh
+npx ricochet --generate-key
+Key: <your key displayed here>
+```
 
-Now you can start the server:
+From here you need to customize `.env` and `site.json` file using this generated
+key.
+Modify the `RICOCHET_SECRET_KEY` in `.env` file and `key` in `site.json`. Both
+must be the same previously generated value.
+
+Default values should be fine for test but remember that data are only kept in
+memory so you loose all your changes each time you restart the ricochet server
+with this default. See [ricochetjs](https://github.com/jrmi/ricochetjs)
+documentation for more options.
+
+Now you can start the ricochet server:
 
 ```sh
-npm run server
+npm run start
 ```
 
-Then you can run the client:
+And you should also watch for backend code modification to generate
+code executed by ricochetjs in another terminal:
 
 ```sh
-npm start
+npm run watch
 ```
 
-### Server
-
-The server code must be used with [ricochetjs](https://github.com/jrmi/ricochetjs)
+### Client
 
-Follows ricochet installation instructions then execute:
+in another terminal, go back to project root and execute:
 
 ```sh
-cd server
+cd <project_root>/
 npm ci
-npm run watch
+cp .env.dist .env
+```
+
+Edit the `.env` file to fit your needs. Default should be fine if you didn't
+modify server configuration.
+
+Then you can start the client:
+
+```sh
+npm start
 ```
+
+Now you should have three terminals:
+
+* the one with ricochetjs server instance. Backend logs can be found here
+* one terminal with auto build on change for backend files
+* one with React frontend server

+ 33 - 0
backend/.env.dist

@@ -0,0 +1,33 @@
+# Secret key generated by ricochetjs. This is the same you put in `site.json` file.
+RICOCHET_SECRET_KEY=
+
+# --- Ricochet configuration start here
+
+SERVER_PORT=3001
+SERVER_HOST=localhost
+
+# memory, disk or s3 storage are available
+FILE_STORAGE=memory
+
+# S3 storage configuration
+S3_ACCESS_KEY=
+S3_SECRET_KEY=
+S3_ENDPOINT=
+S3_BUCKET=
+
+# Only for testing purpose
+S3_BUCKET_TEST=test-bucket-001
+
+# memory or nedb store backend
+STORE_BACKEND=memory
+
+NEDB_BACKEND_DIRNAME=/path/to/data # Any path where nedb databases will be kept
+
+SECRET=YourSuperSecretHere
+
+# Smtp server configuration
+EMAIL_HOST=fake
+EMAIL_PORT=
+EMAIL_USER=
+EMAIL_PASSWORD=
+EMAIL_FROM=

+ 205 - 34
backend/package-lock.json

@@ -1554,9 +1554,9 @@
       "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ=="
     },
     "aws-sdk": {
-      "version": "2.828.0",
-      "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.828.0.tgz",
-      "integrity": "sha512-JoDujGdncSIF9ka+XFZjop/7G+fNGucwPwYj7OHYMmFIOV5p7YmqomdbVmH/vIzd988YZz8oLOinWc4jM6vvhg==",
+      "version": "2.834.0",
+      "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.834.0.tgz",
+      "integrity": "sha512-9WRULrn4qAmgXI+tEW/IG5s/6ixJGZqjPOrmJsFZQev7/WRkxAZmJAjcwd4Ifm/jsJbXx2FSwO76gOPEvu2LqA==",
       "requires": {
         "buffer": "4.9.2",
         "events": "1.1.1",
@@ -2427,7 +2427,6 @@
       "version": "4.3.1",
       "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
       "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
-      "dev": true,
       "requires": {
         "ms": "2.1.2"
       }
@@ -2752,7 +2751,6 @@
       "version": "1.4.4",
       "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
       "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
-      "dev": true,
       "requires": {
         "once": "^1.4.0"
       }
@@ -2907,8 +2905,7 @@
     "escalade": {
       "version": "3.1.1",
       "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
-      "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
-      "dev": true
+      "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw=="
     },
     "escape-html": {
       "version": "1.0.3",
@@ -3534,8 +3531,7 @@
     "get-caller-file": {
       "version": "2.0.5",
       "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
-      "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
-      "dev": true
+      "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
     },
     "get-intrinsic": {
       "version": "1.0.1",
@@ -3675,8 +3671,7 @@
     "has-flag": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
-      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-      "dev": true
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
     },
     "has-symbols": {
       "version": "1.0.1",
@@ -3794,17 +3789,17 @@
       "dev": true
     },
     "i18next": {
-      "version": "19.8.4",
-      "resolved": "https://registry.npmjs.org/i18next/-/i18next-19.8.4.tgz",
-      "integrity": "sha512-FfVPNWv+felJObeZ6DSXZkj9QM1Ivvh7NcFCgA8XPtJWHz0iXVa9BUy+QY8EPrCLE+vWgDfV/sc96BgXVo6HAA==",
+      "version": "19.8.5",
+      "resolved": "https://registry.npmjs.org/i18next/-/i18next-19.8.5.tgz",
+      "integrity": "sha512-mDuH/mvnNXZmvqxl3akSZuJtbX7ou7M66kzfXQTfRngTZ9cAjktlx4yVzA+gS9VPZp51eZOQAGfEDbFcnyvliw==",
       "requires": {
         "@babel/runtime": "^7.12.0"
       }
     },
     "i18next-fs-backend": {
-      "version": "1.0.7",
-      "resolved": "https://registry.npmjs.org/i18next-fs-backend/-/i18next-fs-backend-1.0.7.tgz",
-      "integrity": "sha512-aAZ3rvshe1Zbl6JSCWrWWqbZS5JpmVNG+84YqLcgdYcm9uAxzw4xWxnA/a3044Nm2PKXE62CT+pIZjk7OEYtTw=="
+      "version": "1.0.8",
+      "resolved": "https://registry.npmjs.org/i18next-fs-backend/-/i18next-fs-backend-1.0.8.tgz",
+      "integrity": "sha512-1TyOJEGBvwqdIu0vZo/pcAxPXe/0vqOX6/hgsgTnNpcGe0PyHJ/87ABDdwdwfKJSxbtM0j6Pue0NKFcx6rOeJg=="
     },
     "i18next-http-middleware": {
       "version": "3.1.0",
@@ -4505,6 +4500,11 @@
         "minimist": "^1.2.5"
       }
     },
+    "moment": {
+      "version": "2.29.1",
+      "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
+      "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
+    },
     "ms": {
       "version": "2.1.2",
       "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -4761,7 +4761,6 @@
       "version": "1.4.0",
       "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
       "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
-      "dev": true,
       "requires": {
         "wrappy": "1"
       }
@@ -4939,9 +4938,9 @@
       }
     },
     "pino": {
-      "version": "6.10.0",
-      "resolved": "https://registry.npmjs.org/pino/-/pino-6.10.0.tgz",
-      "integrity": "sha512-ZFGE/Wq930gFb1h0RI6S/QOfkyzNj94Xubwlyo4XpxNUgrG1C0iEqnlooG5Fymx6yrUUtEJ8j/u8NCGwgwTXaQ==",
+      "version": "6.11.0",
+      "resolved": "https://registry.npmjs.org/pino/-/pino-6.11.0.tgz",
+      "integrity": "sha512-VPqEE2sU1z6wqkTtr7DdTktayTNE/JgeuWjfXh9g/TI6X7venzv4gaoU24/jSywf6bBeDfZRHWEeO/6f8bNppA==",
       "requires": {
         "fast-redact": "^3.0.0",
         "fast-safe-stringify": "^2.0.7",
@@ -4969,9 +4968,55 @@
       }
     },
     "pino-std-serializers": {
-      "version": "3.1.1",
-      "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-3.1.1.tgz",
-      "integrity": "sha512-Ud4+WzgEr/swOlfQdkxqKP2hlwuQlIqQ5YwYpo9MczNg2mpsKKyKgwQXW5KnP5tgH3/Cy9QRhAhLM8k1K+gfnA=="
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-3.2.0.tgz",
+      "integrity": "sha512-EqX4pwDPrt3MuOAAUBMU0Tk5kR/YcCM5fNPEzgCO2zJ5HfX0vbiH9HbJglnyeQsN96Kznae6MWD47pZB5avTrg=="
+    },
+    "pino-tiny": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/pino-tiny/-/pino-tiny-1.0.0.tgz",
+      "integrity": "sha512-1YMMeBji+4cxlBqs6GxX8df6oWh0ibQNF3ETRPA6V/VE/jvPXGpJjdTaoPu6FHHJE+ATjLTvAXuTEc293JJI2Q==",
+      "requires": {
+        "chalk": "^4.0.0",
+        "debug": "^4.1.1",
+        "minimist": "^1.2.5",
+        "moment": "^2.25.1",
+        "pump": "^3.0.0",
+        "split2": "^3.1.1",
+        "through2": "^3.0.1"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
+          "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+        }
+      }
     },
     "pkg-dir": {
       "version": "5.0.0",
@@ -5034,7 +5079,6 @@
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
       "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
-      "dev": true,
       "requires": {
         "end-of-stream": "^1.1.0",
         "once": "^1.3.1"
@@ -5253,8 +5297,7 @@
     "require-directory": {
       "version": "2.1.1",
       "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
-      "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
-      "dev": true
+      "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
     },
     "require-main-filename": {
       "version": "2.0.0",
@@ -5318,9 +5361,9 @@
       "dev": true
     },
     "ricochet-js": {
-      "version": "0.2.0",
-      "resolved": "https://registry.npmjs.org/ricochet-js/-/ricochet-js-0.2.0.tgz",
-      "integrity": "sha512-QF+w/aO/opdw8/cs11HfJnsClypdZK+7acnXiAc/Ok3RBc/CEtGuU3IzIiIcAFr1XPd7Llv5GNDxSqvCMdksvg==",
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/ricochet-js/-/ricochet-js-0.2.1.tgz",
+      "integrity": "sha512-h6/XmTUAYfhYBHAfa6sQHHAY2nImFHAxXBRg5Qx68rHXpQGkcUUtH7kTO2je6lQMNhk2BJrhZwVjRvOLw0igdw==",
       "requires": {
         "aws-sdk": "^2.799.0",
         "body-parser": "^1.19.0",
@@ -5342,7 +5385,108 @@
         "nodemailer": "^6.4.16",
         "pino": "^6.7.0",
         "pino-http": "^5.3.0",
-        "socket.io": "^2.3.0"
+        "socket.io": "^2.3.0",
+        "yargs": "^16.2.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+          "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
+        },
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "cliui": {
+          "version": "7.0.4",
+          "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
+          "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
+          "requires": {
+            "string-width": "^4.2.0",
+            "strip-ansi": "^6.0.0",
+            "wrap-ansi": "^7.0.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+        },
+        "emoji-regex": {
+          "version": "8.0.0",
+          "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+          "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
+        },
+        "is-fullwidth-code-point": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+          "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
+        },
+        "string-width": {
+          "version": "4.2.0",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+          "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+          "requires": {
+            "emoji-regex": "^8.0.0",
+            "is-fullwidth-code-point": "^3.0.0",
+            "strip-ansi": "^6.0.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "6.0.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+          "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+          "requires": {
+            "ansi-regex": "^5.0.0"
+          }
+        },
+        "wrap-ansi": {
+          "version": "7.0.0",
+          "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+          "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+          "requires": {
+            "ansi-styles": "^4.0.0",
+            "string-width": "^4.1.0",
+            "strip-ansi": "^6.0.0"
+          }
+        },
+        "y18n": {
+          "version": "5.0.5",
+          "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz",
+          "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg=="
+        },
+        "yargs": {
+          "version": "16.2.0",
+          "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
+          "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
+          "requires": {
+            "cliui": "^7.0.2",
+            "escalade": "^3.1.1",
+            "get-caller-file": "^2.0.5",
+            "require-directory": "^2.1.1",
+            "string-width": "^4.2.0",
+            "y18n": "^5.0.5",
+            "yargs-parser": "^20.2.2"
+          }
+        },
+        "yargs-parser": {
+          "version": "20.2.4",
+          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
+          "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA=="
+        }
       }
     },
     "rimraf": {
@@ -5973,6 +6117,26 @@
         "extend-shallow": "^3.0.0"
       }
     },
+    "split2": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz",
+      "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==",
+      "requires": {
+        "readable-stream": "^3.0.0"
+      },
+      "dependencies": {
+        "readable-stream": {
+          "version": "3.6.0",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+          "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+          "requires": {
+            "inherits": "^2.0.3",
+            "string_decoder": "^1.1.1",
+            "util-deprecate": "^1.0.1"
+          }
+        }
+      }
+    },
     "stable": {
       "version": "0.1.8",
       "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz",
@@ -6097,7 +6261,6 @@
       "version": "7.2.0",
       "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
       "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-      "dev": true,
       "requires": {
         "has-flag": "^4.0.0"
       }
@@ -6153,6 +6316,15 @@
         "terser": "^5.3.8"
       }
     },
+    "through2": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz",
+      "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==",
+      "requires": {
+        "inherits": "^2.0.4",
+        "readable-stream": "2 || 3"
+      }
+    },
     "thunky": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz",
@@ -6790,8 +6962,7 @@
     "wrappy": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
-      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
-      "dev": true
+      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
     },
     "ws": {
       "version": "6.2.1",

+ 6 - 6
backend/package.json

@@ -1,14 +1,13 @@
 {
   "name": "airboardgame_back",
   "version": "0.1.0",
-  "description": "Bakend files for airboardgame",
+  "description": "Bakend files for Airboardgame executed by Ricochetjs",
   "main": "index.js",
   "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1",
-    "nodev": "npm-run-all -p watch:src watch:dist",
     "watch": "webpack --config webpack.watch.js",
-    "start": "webpack serve --config webpack.development.js",
-    "build": "webpack --config webpack.production.js"
+    "serve": "webpack serve --config webpack.development.js",
+    "build": "webpack --config webpack.production.js",
+    "start": "ricochet | pino-tiny"
   },
   "author": "",
   "license": "ISC",
@@ -25,6 +24,7 @@
   },
   "dependencies": {
     "dotenv": "^8.2.0",
-    "ricochet-js": "^0.2.0"
+    "pino-tiny": "^1.0.0",
+    "ricochet-js": "^0.2.1"
   }
 }

+ 7 - 0
backend/site.dist.json

@@ -0,0 +1,7 @@
+{
+  "airboardgame": {
+    "name": "Air Board Game",
+    "key": "<--Put generated private key here-->",
+    "emailFrom": "\"Fake mail\" <fake@example.com>"
+  }
+}

+ 1 - 1
package.json

@@ -50,7 +50,7 @@
     "lint": "eslint src/",
     "prettier": "prettier --write src/",
     "eject": "react-scripts eject",
-    "server": "echo 'The server is now packaged in separate app. See https://github.com/jrmi/airboardgame-back'",
+    "server": "echo 'This command is deprecated. Please, see Readme for more information.'",
     "i18n:scanner": "i18next-scanner --config i18next-scanner.config.js 'src/**/*.{js,jsx}'",
     "cypress:open": "LANGUAGE=en cypress open",
     "cypress:run": "LANGUAGE=en cypress run",