Durss / Twitchat

Full featured Twitch chat alternative to fill gaps from the official one.
https://twitchat.fr
GNU General Public License v3.0
269 stars 30 forks source link

Instruction for self hosting seems wrong #47

Closed syrm closed 1 year ago

syrm commented 1 year ago

Hello,

Thanks for your work, i’m trying to self host the version, but the instruction to do it seems wrong. In the Install server section you said : Next to this file, create a dist folder But in the example structure

─ root
  ├─ node_modules/
  ├─ dist/
  ├─ controllers/
  ├─ utils/
  ├─ bootstrap.js
  ├─ env.conf
  ├─ credentials.json

the dist file is within the server folder, not next to it. When the dist directory is in the server folder the directory can't be found. But when the directory is next to the server folder its ok.

Beside this detail, when i start the server with node bootstrap.js there is no translation, only key of translation are visibles.

Durss commented 1 year ago

Hello :)

Production mode isn't super straigthforward i must admit. The production mode structure isn't compatible with the GIT project's structure. Fontend build files for production run must be on the "public" folder, but the GIT project's "public" folder contains only some static files used by Vite to build the "dist" folder.

Basically, if you want to run the project in production mode ("env.conf" content set to prod) you must move everything to a dedicated folder.

Here is what I do to deploy on production:

With this things should be running properly.

Maybe the readme is missing a line stating explicitely that the files should be move outside the GIT project folder. Is this what you missed ?

syrm commented 1 year ago

Your explication works, thank you

Durss commented 1 year ago

Just saw the readme indeed had an error it was saying "set the content of the dist folder to the dist folder of the server" instead of "[...] the public folder of the server"

Also I'm gonna renam the local public folder to static as it makes more sense and will be less confusing :)