From 0e8f8811f644d09c09bc078bb8e52c99a74a9c22 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Fri, 8 Jan 2021 22:18:50 -0700 Subject: [PATCH 01/27] Add survey link to the VueX state --- web/src/store/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/src/store/index.js b/web/src/store/index.js index 7ef1b22..6b8c042 100644 --- a/web/src/store/index.js +++ b/web/src/store/index.js @@ -5,6 +5,8 @@ Vue.use(Vuex); export default new Vuex.Store({ state: { + survery_link: ``, + team_1: { name: `Sun`, icon: `sun.svg`, @@ -31,6 +33,7 @@ export default new Vuex.Store({ guesser_name: `Medium`, guesser_card_button: `Ask Spirit`, + eye_icon: `eye.svg`, discard_hand_icon: `trash.svg`, From 66ff8882214573a54af3f8772fc8c57bf4092687 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Fri, 8 Jan 2021 23:11:58 -0700 Subject: [PATCH 02/27] Add survey button to attributions popup and hand at end of the game. Closes #38 --- web/src/components/Attributions.vue | 20 +++++++++++++++++++- web/src/components/Hand.vue | 5 +++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/web/src/components/Attributions.vue b/web/src/components/Attributions.vue index 221277b..1e200bf 100644 --- a/web/src/components/Attributions.vue +++ b/web/src/components/Attributions.vue @@ -12,7 +12,16 @@ >

Attributions:

- Made By: Oliver Akins + Ghost Writer is designed and created by + Resonym +
+ Online Prototype Made By: Oliver Akins (Alkali Metal) +
+ + +


@@ -77,6 +86,15 @@ export default { height: 100%; } +button { + background-color: var(--background2); + color: var(--background2-text); + border-radius: 7px; + font-size: large; + padding: 10px; + margin: 5px; +} + a, a:visited { color: var(--light-font-colour); } diff --git a/web/src/components/Hand.vue b/web/src/components/Hand.vue index 43a215d..fff3911 100644 --- a/web/src/components/Hand.vue +++ b/web/src/components/Hand.vue @@ -4,6 +4,11 @@ {{ mostRecentQuestion }}

+ + + diff --git a/web/src/components/Hand.vue b/web/src/components/Hand.vue index 0d97e08..0143ff2 100644 --- a/web/src/components/Hand.vue +++ b/web/src/components/Hand.vue @@ -4,7 +4,12 @@ {{ mostRecentQuestion }}
- + From ed2c96762a10fb32beaf15bd66b8af798542b19b Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Fri, 8 Jan 2021 23:17:52 -0700 Subject: [PATCH 07/27] Point the Resonym site link to the Resonym site rather than a path on this site. --- web/src/components/Attributions.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/Attributions.vue b/web/src/components/Attributions.vue index 43e97c5..7d8a53d 100644 --- a/web/src/components/Attributions.vue +++ b/web/src/components/Attributions.vue @@ -13,7 +13,7 @@

Attributions:

Ghost Writer is designed and created by - Resonym + Resonym
Online Prototype Made By: Oliver Akins (Alkali Metal)
From d613e53de90fac52aa09b9763a27eccfb24aec06 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 00:17:05 -0700 Subject: [PATCH 08/27] Remove the webserver section of the server config --- server/template.toml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/server/template.toml b/server/template.toml index 06f4f51..c0297f4 100644 --- a/server/template.toml +++ b/server/template.toml @@ -47,14 +47,6 @@ column = 0 fingerprint = '' -[webserver] -# whether or not to enable the integrated webserver. -enabled = false - -# The port the web server should run on -port = 8080 - - [websocket] # The port the websocket server should run on. This must also be duplicated # into the `main.js` file within the `web` folder so that the client attempts From db585bb1dcdf7a4ce3c3cfad977a3f2975f7acc4 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 00:17:19 -0700 Subject: [PATCH 09/27] Add the datastores section of the server config --- server/template.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/server/template.toml b/server/template.toml index c0297f4..766983b 100644 --- a/server/template.toml +++ b/server/template.toml @@ -63,6 +63,21 @@ port = 8081 permitted_hosts = "http://localhost:8080" +[datastores] + +# Whether or not to save games that are active to the server's hard drive when +# it crashes for whatever reason. This will also enable loading of those games +# on server startup and allows game clients to reconnect to the game. +enabled = false + +# The file extension used to save and load the datastore files. +filetype = "game" + +# The filepath pointing to where to save the datastore files to. This can +# either be a relative or absolute filepath. +directory = "" + + [log] # The log level to output to the CLI, this can be one of the following: # - "silly" From bf7732de2690fb452a8bdbe62ec389fbc52a766d Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 00:17:44 -0700 Subject: [PATCH 10/27] Emit event to all clients in game not just writers --- server/src/events/SelectObject.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/events/SelectObject.ts b/server/src/events/SelectObject.ts index d50faf2..018c9e3 100644 --- a/server/src/events/SelectObject.ts +++ b/server/src/events/SelectObject.ts @@ -29,7 +29,7 @@ export default (io: Server, socket: Socket, data: SelectObject) => { game.log.debug(`Object has been chosen: ${data.choice}`); game.object = data.choice; - io.to(`${game.id}:*:writer`).emit(`ChosenObject`, { + io.to(game.id).emit(`ChosenObject`, { status: 200, choice: data.choice, }); From 5ebe6ea5c70fa29b3bbced099e07eee39af0a8f9 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 00:18:17 -0700 Subject: [PATCH 11/27] Remove vertical margin so flex can deal with it better --- web/src/components/GameBoard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/GameBoard.vue b/web/src/components/GameBoard.vue index 81d94c6..8db1d70 100644 --- a/web/src/components/GameBoard.vue +++ b/web/src/components/GameBoard.vue @@ -243,9 +243,9 @@ input[type="text"] { border-width: 2px; font-size: larger; outline: none; - margin: 7px 0; padding: 7px; width: 90%; + margin: 0; } input[type="text"]:focus { border-color: var(--board-background-text); From 9336bf641ae21203d6a2c0990f644ce89c6c6e29 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 00:26:29 -0700 Subject: [PATCH 12/27] Update gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2e1c742..6f52af8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,8 @@ node_modules server/server.toml server/built/* server/dist/* -server/resources/games +server/resources/* +*.log #=============================================================================# # The files that were auto-generated into a .gitignore by Vue-cli From 3cb599511ee025f9e03154401da6e96aafd29bf9 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 00:51:55 -0700 Subject: [PATCH 13/27] Change README to have proper install instructions. --- web/README.md | 55 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/web/README.md b/web/README.md index 27dd417..8976738 100644 --- a/web/README.md +++ b/web/README.md @@ -1,19 +1,44 @@ -## Project setup -``` -pnpm install -``` +# Setup: +1. `cd` into this `web` directory. +2. Run `pnpm install` to install all of the required dependencies for the site. -### Compiles and hot-reloads for development -``` -pnpm run serve -``` +Now jump to the [Production](#Production) or [Development](#Development) +section and continue the steps there. -### Compiles and minifies for production -``` -pnpm run build -``` +--- -### Lints and fixes files +## Production +3. Run `pnpm build` to create the folder with all the files for the webserver. +4. Create a symlink pointing to the `dist/` directory that was created in the +last step. +5. Tell your favourite web server (I'd recommend nginx) for serving the files +from that directory. +6. In the webserver of your choice, you must also setup an +`example.com/socket.io` route that reverse proxies the websocket connection +through to the Node.js server. If you do not want to set up this proxy, you can +bypass it by changing the URI in the `serc/main.js` file to have a specific URL and port. + +Example: Change +```js +// This is the default value that will require a +// "/socket.io" proxy in your web server. +let websocket_uri = `/`; ``` -pnpm run lint -``` \ No newline at end of file +to: +```js +// this is the specific domain and port to connect to, as an example on how to +// bypass setting up a reverse proxy. +let websocket_uri = `http://example.com:1234`; +``` +7. Once the reverse proxy or specific URI is setup, connect to your website through the appropriate domain and check to see if it worked. + + +## Development: +3. Make sure the websocket server is started either through a terminal or +through the systemd service on port `8081` for local development. (if you want +to connect to a websocket server that is not on port 8081 for development, you +will need to change the port value in `src/main.js` to the correct port number) +4. Run `pnpm serve`, this will start a local hot-reloading server on +`localhost:8080`. **DO NOT** reverse-proxy this server. It serves files that +are not optimized nor minified. +5. Go to `localhost:8080` in your web browser of choice. \ No newline at end of file From c16257cdbedbb74d37b260a6c1f0fa9215e14cc6 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 01:20:15 -0700 Subject: [PATCH 14/27] Add configuration section to README --- web/README.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/web/README.md b/web/README.md index 8976738..9b33762 100644 --- a/web/README.md +++ b/web/README.md @@ -41,4 +41,33 @@ will need to change the port value in `src/main.js` to the correct port number) 4. Run `pnpm serve`, this will start a local hot-reloading server on `localhost:8080`. **DO NOT** reverse-proxy this server. It serves files that are not optimized nor minified. -5. Go to `localhost:8080` in your web browser of choice. \ No newline at end of file +5. Go to `localhost:8080` in your web browser of choice. + + +--- + +# Configuration: +Configuring the site is pretty simple, the most complicated part is already +done because you have a functional web server. + +In order to edit any of the following settings, go to `src/store/index.js` and +find the respective value in the section that allows editing. **Important**: +Any values edited in this file will require re-building the site using +`pnpm build`, and the changes will only take place after players refresh their +web browser. + +| Variable | Type | Description +| -------- | ---- | ----------- +| survey_link | string | This is the link to the survey that will appear in the player's hand once the object has been correctly guessed and in the attributions modal. This can be left empty or `null` without any problems, the buttons will be hidden. +| name* | string | The name of the team. +| icon* | string | The filename of the icon used for the team reminder for the team. This assumes the file is in the `public/assets/` directory. +| eyes* | other | This is an object of numbers used to indicate how many eyes appear on that slot of the game board for the team. +| writer_name | string | How the interface should refer to the players who are receiving cards and writing. +| writer_card_button | string | The text that appears on the cards that are given to the writer by the guessers. +| writer_object_choose_button | string | The text that appears on the object choices for the writers to select one for them to use before being allowed to start giving clues to the guessers. +| guesser_name | string | How the interface should refer to the players who are sending the cards and guessing what the object is. +| guesser_card_button | string | The text that appears on the button for the cards in the guesser's hand in order to give the card to the writer. +| eye_icon | string | The filename of the eye icon. This assumes the file is in the `public/assets/` directory. +| discard_hand_icon | string | The filename of the icon used on the guesser's discard hand button. This assumes the file is in the `public/assets/` directory. + +\* _Note_: These exist for teams 1 and 2, they can each have their own values (and it is recommended that they don't have the same values). \ No newline at end of file From 5057294c0e07eddd4cd4e2e7f6af21a3b3e3cb45 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 01:23:04 -0700 Subject: [PATCH 15/27] Add response listener for GameReset --- web/src/components/Hand.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/web/src/components/Hand.vue b/web/src/components/Hand.vue index 0143ff2..ba6b307 100644 --- a/web/src/components/Hand.vue +++ b/web/src/components/Hand.vue @@ -142,6 +142,18 @@ export default { console.error(`Server returned an unsupported mode: ${data.mode}`); }; }, + GameReset(data) { + if (data.status < 200 || 300 <= data.status) { + return this.$emit(`error`, data); + }; + this.$store.commit(`setAnswers`, { + team_1: new Array(8).fill(``), + team_2: new Array(8).fill(``), + }); + this.$store.commit(`replaceHand`, []); + this.$store.commit(`setObject`, null); + this.$store.commit(`view`, `lobby`); + }, }, } From 9d7bd8c893f3c4a270fe78659ce894c776ee77ed Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 01:25:31 -0700 Subject: [PATCH 16/27] Move ChosenObject listener from the ChooseObject component to the InGame component so that the guessers also have a listener for the event data. --- web/src/components/ChooseObject.vue | 11 ----------- web/src/views/InGame.vue | 13 +++++++++++++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/web/src/components/ChooseObject.vue b/web/src/components/ChooseObject.vue index cfc072b..2cb46cb 100644 --- a/web/src/components/ChooseObject.vue +++ b/web/src/components/ChooseObject.vue @@ -62,17 +62,6 @@ export default { */ this.objects = data.objects; }, - ChosenObject(data) { - /** - * Sent to all clients so that they can set their store data and in - * turn stay synchronized on what object they are trying to get - * their teammate to guess. - */ - if (data.status < 200 || 300 <= data.status) { - this.$emit(`error`, data); - }; - this.$store.commit(`setObject`, data.choice); - }, }, mounted() { this.getObjects(); diff --git a/web/src/views/InGame.vue b/web/src/views/InGame.vue index ebf7e74..6bf1eb3 100644 --- a/web/src/views/InGame.vue +++ b/web/src/views/InGame.vue @@ -48,6 +48,19 @@ export default { }, }, methods: {}, + sockets: { + ChosenObject(data) { + /** + * Sent to all clients so that they can set their store data and in + * turn stay synchronized on what object they are trying to get + * their teammate to guess. + */ + if (data.status < 200 || 300 <= data.status) { + this.$emit(`error`, data); + }; + this.$store.commit(`setObject`, data.choice); + }, + } } From 64b4bce28c1c706ed53b104d54ccf0e8b783ecd2 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 01:30:09 -0700 Subject: [PATCH 17/27] Update log level default to be info instead of silly. --- server/template.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/template.toml b/server/template.toml index 766983b..9d1e438 100644 --- a/server/template.toml +++ b/server/template.toml @@ -87,4 +87,4 @@ directory = "" # - "error" # - "trace" # any other value will prevent the server from starting at runtime. -level = "silly" \ No newline at end of file +level = "info" \ No newline at end of file From 48e2ae15f8a1bc379b84a17c7b0f5d80c16c2ad1 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 01:54:11 -0700 Subject: [PATCH 18/27] Add setup instructions for the server --- server/README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 server/README.md diff --git a/server/README.md b/server/README.md new file mode 100644 index 0000000..c747e86 --- /dev/null +++ b/server/README.md @@ -0,0 +1,43 @@ +# Setup: +1. `cd` into this `server` directory. +2. Run `pnpm install` to install all of the required dependencies. +3. Create a copy of the `template.toml` file, and name it `server.toml`. +4. Edit the `server.toml` file to adjust the +5. Run `tsc` to compile the TypeScript into Javascript. This should create a +`dist` directory. + + +## Using systemd to manage the server: (Not currently implemented) +This app comes with a `ghost-writer.service` file which is already set up to +manage the server, it just requires a little bit of additional setup. If you +change any of the symlinking in the steps below, it is your responsibility to +figure it out, I will not guarantee support for people who attempt to modify +the service file. + +6. Create a symlink named `server` in the server root (`/`) pointing to the +server folder in the Ghost Writer git repository. +(Ex: `sudo ln -s ~/Ghost-Writer-Online/server /server`) +7. Create a symlink named `ghost-writer.service` in `/` +pointing to the service file in the `server` folder of the Ghost Writer Online +repository. (Ex: `sudo ln -s //ghost-writer.service /server/ghost-writer.service`) +8. Run `sudo systemctl enable ghost-writer` to tell systemd to use that service +9. Start the websocket server with `sudo systemctl start ghost-writer`. +10. Make sure the server is started by running `systemctl status ghost-writer` + +* To restart the server, run `sudo systemctl restart ghost-writer`. +* To stop the server, run `sudo systemctl stop ghost-writer`. +* To access the server logs, run `journalctl` + + +## Using a detached terminal: +If you would prefer that the server does not automatically restart and you can +more easily output log output to a file, you can run the server by following +the below steps: + +6. Make sure you know how to invoke a single command with your preferred method +of detaching terminals. +7. Have the detached terminal's working directory be in the `server` folder of +this repository. +8. Run `node dist/main.js` for logging directly to the CLI, or +`node dist/main.js > output.log` for logging to a file named `output.log`. +9. Detach your terminal. \ No newline at end of file From cddac3a6421138ea33bf0f2eee11be9f10ce2f5a Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 01:56:34 -0700 Subject: [PATCH 19/27] Add configuration section to server readme --- server/README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server/README.md b/server/README.md index c747e86..8edf3a1 100644 --- a/server/README.md +++ b/server/README.md @@ -40,4 +40,14 @@ of detaching terminals. this repository. 8. Run `node dist/main.js` for logging directly to the CLI, or `node dist/main.js > output.log` for logging to a file named `output.log`. -9. Detach your terminal. \ No newline at end of file +9. Detach your terminal. + + +--- + +# Configuration: +All of the configuration for the server is done in the `server.toml` with +explanations in the file. When a value is changed in the config, you will need +to restart the server. This is either through systemd +(`sudo systemctl restart ghost-writer`) or through your preferred terminal +detacher, by stopping then re-starting the process. \ No newline at end of file From e7344fe45c7096de2656694ab18db4f123602e1d Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 14:35:22 -0700 Subject: [PATCH 20/27] Add proper filepath for the service file link. --- server/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/README.md b/server/README.md index 8edf3a1..3ae3e24 100644 --- a/server/README.md +++ b/server/README.md @@ -19,7 +19,7 @@ server folder in the Ghost Writer git repository. (Ex: `sudo ln -s ~/Ghost-Writer-Online/server /server`) 7. Create a symlink named `ghost-writer.service` in `/` pointing to the service file in the `server` folder of the Ghost Writer Online -repository. (Ex: `sudo ln -s //ghost-writer.service /server/ghost-writer.service`) +repository. (Ex: `sudo ln -s /etc/systemd/system/ghost-writer.service /server/ghost-writer.service`) 8. Run `sudo systemctl enable ghost-writer` to tell systemd to use that service 9. Start the websocket server with `sudo systemctl start ghost-writer`. 10. Make sure the server is started by running `systemctl status ghost-writer` From bfc5453f28eb9fec418acd7f63c5446171c5d732 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 14:35:36 -0700 Subject: [PATCH 21/27] Create service file. --- server/ghost-writer.service | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 server/ghost-writer.service diff --git a/server/ghost-writer.service b/server/ghost-writer.service new file mode 100644 index 0000000..c0fdf9d --- /dev/null +++ b/server/ghost-writer.service @@ -0,0 +1,9 @@ +[Unit] +Description=Ghost Writer websocket server + +[Service] +Type=simple +WorkingDirectory=/server +ExecStart=node /server/dist/main.js +Restart=always +RestartSec=5 \ No newline at end of file From b1331a519b76cdefe34d748a6a978f7924f91e0d Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 14:56:23 -0700 Subject: [PATCH 22/27] Add config option for datetime visibility in the logger --- server/src/main.ts | 1 + server/src/types/config.d.ts | 1 + server/template.toml | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/main.ts b/server/src/main.ts index 22eb409..cb5cdc2 100644 --- a/server/src/main.ts +++ b/server/src/main.ts @@ -25,6 +25,7 @@ export var hibernatedGames: string[] = []; export var games: {[index: string]: Game} = {}; export const log: Logger = new Logger({ + displayDateTime: conf.log.datetime, displayFunctionName: false, displayLoggerName: true, displayFilePath: `hidden`, diff --git a/server/src/types/config.d.ts b/server/src/types/config.d.ts index f114c07..dfda422 100644 --- a/server/src/types/config.d.ts +++ b/server/src/types/config.d.ts @@ -1,6 +1,7 @@ interface config { log: { level: `silly` | `debug` | `info` | `error` | `warn` | `fatal` | `trace`; + datetime: boolean; }; websocket: { port: number; diff --git a/server/template.toml b/server/template.toml index 9d1e438..81a57ec 100644 --- a/server/template.toml +++ b/server/template.toml @@ -87,4 +87,7 @@ directory = "" # - "error" # - "trace" # any other value will prevent the server from starting at runtime. -level = "info" \ No newline at end of file +level = "info" + +# Whether or not the log should output the date and time information in the log +datetime = true \ No newline at end of file From 2d520e2ceb383007e79432aca3a1778e6100bb27 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 14:59:06 -0700 Subject: [PATCH 23/27] Remove resources cache from git --- server/resources/GW_objects.csv | 21 -------- server/resources/GW_questions.csv | 82 ------------------------------- 2 files changed, 103 deletions(-) delete mode 100644 server/resources/GW_objects.csv delete mode 100644 server/resources/GW_questions.csv diff --git a/server/resources/GW_objects.csv b/server/resources/GW_objects.csv deleted file mode 100644 index c077f9e..0000000 --- a/server/resources/GW_objects.csv +++ /dev/null @@ -1,21 +0,0 @@ -Answer 1,Answer 2,Answer 3,Answer 4,Answer 5 -microphone,lamp,chair,crown,brain -screwdriver,chainsaw,sunglasses,dinosaur,tree -flag,ship,pie,pineapple,helmet -ruler,pen,guitar,skateboard,tomato -bathtub,computer,whale,telescope,submarine -flower,blanket,pacifier,harp,acorn -window,doll,stove,skeleton,vacuum -printer,shoe,bed,fork,shield -catapult,apple,envelope,broom,windmill -flashlight,pyramid,brick,bicycle,truck -train,horse,knife,sponge,shirt -newspaper,clock,basketball,mirror,backpack -phone,car,dragon,platypus,scissors -broccoli,shovel,scorpion,sandwich,piano -pillow,pencil,ladder,laptop,headphones -tent,toothbrush,hammer,coin,peanut -bottle,key,pants,fish,pizza -bowl,bread,wheelchair,rope,giraffe -toilet,house,cloak,soap,banana -painting,tractor,sword,book,umbrella \ No newline at end of file diff --git a/server/resources/GW_questions.csv b/server/resources/GW_questions.csv deleted file mode 100644 index 9e2df71..0000000 --- a/server/resources/GW_questions.csv +++ /dev/null @@ -1,82 +0,0 @@ -Question Text -Where would I be most likely to find it? -What continent/region would I find the most of these? -What country am I most likely to find it in? -What city am I most likely to find it in? -Where in my house am I most likely to find it? -What kind of store am I most likely to find it in? -What era did it first appear in? -What's something that's about as dangerous as it? -What's a variety it comes in? -What subcategory does it fall under? -What's something that's like it? -What color is it most commonly? -What material is it made of? -What does it feel like if I touch it? -How is it made? -What is it used for? -What's a common brand of it? -What's it about the same size as? -What's it about the same weight as? -What does it cost about the same as? -What would happen if I ate it? -What's your favorite version/variety of it? -Who's a fictional character that has/uses it? -Who's a celebrity that has/uses it? -What kind of people commonly have or use it? -What abstract concept is associated with it? -What does it smell like? -What does it taste like? -What noise does it make when dropped? -Who at this table likes it the most? -"If it was an animal, what animal would it be?" -What's a book or movie/TV that it appears prominently in? -What age group likes it the most? -How do you feel about it? -Who dislikes it? -What time of day is it used? -What do I wear when I use it? -Why do people use it? -With what frequency do most people use it? -What part of the body do I use it with? -What do I clean it with? -How is it transported? -Where is it stored? -Where do you use it? -What holiday is it most associated with? -What would I use to write on it? -What's a game that it appears in? -What climate is it most associated with? -What website can I find it on? -How long will it last if left alone? -How does it affect the things around it? -Where would I get one? -How would it react to being pushed down a hill? -What happens if I light it on fire? -What happens if I put it under water? -What superpower would this thing want? -How would I use it as a weapon? -How do I feel after using it? -What would happen if I bent it? -What would I use to destroy it? -What's inside it? -What's its opposite? -What profession works with it? -"If it were a musical instrument, what instrument would it be?" -"If it was a social media website, what site would it be?" -What genre of movie/book is most likely to feature it? -"If it had a favorite food, what would it be?" -What's something you can make using it? -What powers it? -What container would I keep it in? -What's the secondary material it's made of? (not its main material) -Who or what can lift it? -What ancient Greek/Roman god is it most associated with? -What habitat would I be most like to find it in? -What is a group of them called? -Who or what makes it? -What field of science studies it? -"Where does it go when it dies, breaks, or is no longer useful?" -What superhero is it most related to? -What month would I find it or use it in? -"If it was an alcoholic drink, what would it be?" \ No newline at end of file From dd67a7e22eeee3e1e9e4f8291378ee402f00ba6c Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 15:01:13 -0700 Subject: [PATCH 24/27] Update information for the websocket.port property --- server/template.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/template.toml b/server/template.toml index 81a57ec..2d85d90 100644 --- a/server/template.toml +++ b/server/template.toml @@ -48,9 +48,9 @@ fingerprint = '' [websocket] -# The port the websocket server should run on. This must also be duplicated -# into the `main.js` file within the `web` folder so that the client attempts -# to connect to the correct port on the server. +# The port the websocket server should run on. This is the port that you will +# need to target for the web server's reverse proxy, or the specific URI in the +# web code itself. port = 8081 # The hostnames (and protocols) that are allowed to connect to the server. For From bb9f187a2eaad43bc9bb83339dec1979162f79ed Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 15:13:16 -0700 Subject: [PATCH 25/27] Remove step where you try to erroneously enable the ghost-writer service --- server/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/README.md b/server/README.md index 3ae3e24..df41c16 100644 --- a/server/README.md +++ b/server/README.md @@ -20,9 +20,8 @@ server folder in the Ghost Writer git repository. 7. Create a symlink named `ghost-writer.service` in `/` pointing to the service file in the `server` folder of the Ghost Writer Online repository. (Ex: `sudo ln -s /etc/systemd/system/ghost-writer.service /server/ghost-writer.service`) -8. Run `sudo systemctl enable ghost-writer` to tell systemd to use that service -9. Start the websocket server with `sudo systemctl start ghost-writer`. -10. Make sure the server is started by running `systemctl status ghost-writer` +8. Start the websocket server with `sudo systemctl start ghost-writer`. +9. Make sure the server is started by running `systemctl status ghost-writer` * To restart the server, run `sudo systemctl restart ghost-writer`. * To stop the server, run `sudo systemctl stop ghost-writer`. From cd3167663444c89d1c515dd3aaa55d6fe8e56dbf Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 15:13:30 -0700 Subject: [PATCH 26/27] Add command to access logs. --- server/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/README.md b/server/README.md index df41c16..ae6136e 100644 --- a/server/README.md +++ b/server/README.md @@ -25,7 +25,7 @@ repository. (Ex: `sudo ln -s /etc/systemd/system/ghost-writer.service /server/gh * To restart the server, run `sudo systemctl restart ghost-writer`. * To stop the server, run `sudo systemctl stop ghost-writer`. -* To access the server logs, run `journalctl` +* To access the server logs, run `sudo journalctl -u ghost-writer` ## Using a detached terminal: From 8f708133d4a51079af610bdcacf5ef595a229580 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 9 Jan 2021 15:13:46 -0700 Subject: [PATCH 27/27] Add filepath in text step rather than just the example. --- server/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/README.md b/server/README.md index ae6136e..3aed801 100644 --- a/server/README.md +++ b/server/README.md @@ -17,7 +17,7 @@ the service file. 6. Create a symlink named `server` in the server root (`/`) pointing to the server folder in the Ghost Writer git repository. (Ex: `sudo ln -s ~/Ghost-Writer-Online/server /server`) -7. Create a symlink named `ghost-writer.service` in `/` +7. Create a symlink named `ghost-writer.service` in `/etc/systemd/system` pointing to the service file in the `server` folder of the Ghost Writer Online repository. (Ex: `sudo ln -s /etc/systemd/system/ghost-writer.service /server/ghost-writer.service`) 8. Start the websocket server with `sudo systemctl start ghost-writer`.