|
| 1 | +# Getting started |
| 2 | + |
| 3 | +This document explains how to get started with the chat application and explain some concepts. If you ever need help you can make a post on [our subreddit](https://www.reddit.com/r/dcts/). |
| 4 | + |
| 5 | +[TOC] |
| 6 | + |
| 7 | +------ |
| 8 | + |
| 9 | +## Requirements & Recommendations |
| 10 | + |
| 11 | +The software was designed to be setup and run as simple as possible. Using the *`config.json`* file you can manage additional settings that are not present in the web client. For example you could configurate a SQL server compatible with MySQL/MariaDB to improve overall functionality. |
| 12 | + |
| 13 | +| Feature | Description | |
| 14 | +| ----------------------- | ------------------------------------------------------------ | |
| 15 | +| NodeJS | Required v16.16.0 and above [^testedNodeVersions] | |
| 16 | +| MySQL-compatible Server | Optional but ***highly*** recommended! Checkout SQL Docs | |
| 17 | +| Tenor | Optional, used for GIF search | |
| 18 | +| SSL | Optional for localhost, but ***required for public use***! Checkout SSL Docs | |
| 19 | + |
| 20 | +------ |
| 21 | + |
| 22 | +## Installing NodeJS |
| 23 | + |
| 24 | +### Installing on Windows |
| 25 | + |
| 26 | +You can easily install NodeJS by going to the official website at https://nodejs.org/en/download and downloading the *.msi* installer. Once you're done installing you should be able to open a command prompt and entering *`node -v`* should return a version like like *`v18.20.5`*. |
| 27 | + |
| 28 | +```cmd |
| 29 | +Microsoft Windows [Version 10.0.67198.5894] |
| 30 | +(c) Microsoft Corporation. |
| 31 | +
|
| 32 | +C:\Users\you_username>node -v |
| 33 | +v18.20.5 |
| 34 | +``` |
| 35 | + |
| 36 | +### Installing on Linux |
| 37 | + |
| 38 | +Linux too has more the one way of installing NodeJS. The following commands use nvm (node version manager) to install NodeJS. You can also use nvm to manage node versions *~~(as the name might already suggest)~~*. |
| 39 | + |
| 40 | +```bash |
| 41 | +# Download and install nvm: |
| 42 | +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash |
| 43 | + |
| 44 | +# Download and install Node.js: |
| 45 | +nvm install v18.20.2 |
| 46 | + |
| 47 | +# Verify the Node.js version: |
| 48 | +node -v # Should print "v18.20.2". |
| 49 | + |
| 50 | +nvm current # Should print "v18.20.2". |
| 51 | + |
| 52 | +# Verify npm version: |
| 53 | +npm -v # Should print "10.9.2". |
| 54 | + |
| 55 | +# Set Default Node Version, optional |
| 56 | +nvm alias default v18.20.2 |
| 57 | +``` |
| 58 | + |
| 59 | +All install instructions can be found on the [NodeJS website](https://nodejs.org/en/download) if you need different instructions or if you're having issues installing NodeJS. |
| 60 | + |
| 61 | +------ |
| 62 | + |
| 63 | +## Running the app |
| 64 | + |
| 65 | +The chat app was made to be very easy to setup and use. Out of the box it should work without any issues. To start the server on both Windows and Linux, navigate to the app's root directory using a command prompt and start the server using *`node .`* |
| 66 | + |
| 67 | +Example: |
| 68 | + |
| 69 | +```cmd |
| 70 | +# Navigate to the project directory |
| 71 | +cd /path/to/dcts-shipping |
| 72 | +
|
| 73 | +# Start the server |
| 74 | +node . |
| 75 | +``` |
| 76 | + |
| 77 | +As you can see all you really need is one command to launch the chat app if NodeJS is already installed. This was made with the goal to be very user friendly and easy to setup and use. |
| 78 | + |
| 79 | +Its possible to use more advanced and better starting methods, such as using docker or supervisor and screen. Information about these can be found in the other documents. |
| 80 | + |
| 81 | +------ |
| 82 | + |
| 83 | +## Accessing your chat app |
| 84 | + |
| 85 | +On default your chat app will run on the port 2052. The port can be changed inside the *`config.json`* file under *`serverinfo.port`*. To access the web client you can open a browser and enter http://localhost:2052/, if you're running the chat app locally on your machine. |
| 86 | + |
| 87 | +Of course if you installed and ran the chat app on your server you would need to replace *`localhost`* with the server's ip address or domain. |
| 88 | + |
| 89 | +> [!NOTE] |
| 90 | +> |
| 91 | +> Its possible to setup a reverse proxy to get rid of the port in the url. Please check the other documents for instructions and carefully read them first! |
| 92 | +
|
| 93 | +------ |
| 94 | + |
| 95 | +## Getting Administrator permissions |
| 96 | + |
| 97 | +When you open the chat app for the first time in the web client you will be prompted to register for an account. After that you will notice that you're just a normal member. In the console you can find a Server Admin Token. |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | +You can use it to redeem the administrator role in the web client. To do so right click any group and click *`Redeem Key`* like in the screenshot. After entering the key you will receive the Administrator role. |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | +[^testedNodeVersions]: Checkout Github Repo "Tested Node Versions" |
0 commit comments