Skip to content

Commit

Permalink
Merge pull request #35 from dalexhd/feature/add-steam-rich-presence
Browse files Browse the repository at this point in the history
Add steam rich presence
  • Loading branch information
dalexhd authored Apr 18, 2020
2 parents de09781 + 86831e1 commit faa8992
Show file tree
Hide file tree
Showing 67 changed files with 10,745 additions and 13,749 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules
# local env files
.env.local
.env.*.local
profiling/

# Log files
npm-debug.log*
Expand Down
22 changes: 22 additions & 0 deletions docs/docs/guide/running-steamspeak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
id: running-steamspeak
title: Running SteamSpeak
---

## Running the bot instance

:::important

**Be sure** that you've configured your [bot](../setup/configuration/bot) correctly before running the following command.

:::

```bash
yarn run start:backend
```

## Running the website instance

```bash
yarn run start:client
```
55 changes: 49 additions & 6 deletions docs/docs/setup/configuration/bot.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,19 @@ Navigate to `packages/server/config` directory and modify previusly generated fi

```javascript
module.exports = {
stdTTL: 0,
checkperiod: 120
host: '127.0.0.1',
port: 6379,
debug: false
};
```

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `stdTTL` | `number` | `0` | The standard ttl as number in seconds for every generated cache element. |
| `checkperiod` | `number` | `120` | The period in seconds, as a number, used for the automatic delete check interval. |
| `host` | `string` | `127.0.0.1` | The host to connect to. |
| `port` | `number` | 6379 | The port of the Redis instance. |
| `debug` | `boolean` | false | Debug redis connection. |

### Database configuration

Expand All @@ -43,7 +45,7 @@ module.exports = {
user: '',
password: '',
database: 'steam_speak',
opts: { useNewUrlParser: true, useUnifiedTopology: true }
opts: { useCreateIndex: true, useNewUrlParser: true, useUnifiedTopology: true }
};
```

Expand All @@ -56,7 +58,7 @@ module.exports = {
| `user` | `string` | | Username for authentication. |
| `password` | `string` | | Password for authentication. |
| `database` | `string` | `steam_speak` | The name of the database we want to use. |
| `opts` | `object` | `{ useNewUrlParser: true, useUnifiedTopology: true }` | Optional options of the connection. |
| `opts` | `object` | `{ useCreateIndex: true, useNewUrlParser: true, useUnifiedTopology: true }` | Optional options of the connection. |

### Steam configuration

Expand Down Expand Up @@ -114,3 +116,44 @@ module.exports = {
| `server_id` | `number` | `1` | The server id of the server. |
| `channel_id` | `number` | `1` | The channel where the bot stays in. |
| `debug` | `boolean` | `false` | Debug teamspeak connection. |


### Web server configuration

This web server configuration file is located at `src/server/config/website.js`

```javascript
module.exports = {
port: 3000,
hostname: 'localhost', //Ex: https://my-website.com (without last slash)
cors: {
/**
* @see https://github.com/expressjs/cors#configuration-options
*/
origin: ['*'],
methods: ['GET', 'HEAD', 'PUT', 'PATCH', 'POST', 'DELETE'],
preflightContinue: false,
optionsSuccessStatus: 204
},
jwt: {
/**
* @see https://randomkeygen.com/
*/
secret: 'put a secret key here',
options: {
expiresIn: '2h'
}
},
admins: []
};
```

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `port` | `number` | `3000` | The host to connect to. |
| `hostname` | `string` | `localhost` | The queryport to use. |
| `cors` | `object` | | Cors options. See https://github.com/expressjs/cors#configuration-options |
| `jwt` | `object` | | JWT options |
| `admins` | `array` | | Admin uids that should be able to login into the web admin panel. |
2 changes: 2 additions & 0 deletions docs/docs/setup/configuration/website.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
id: website
title: Website configuration
---

## Website configuration
Loading

0 comments on commit faa8992

Please sign in to comment.