blob: f294b0fae13e9021cdbf95643072cac6632778cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
## Modules
<dl>
<dt><a href="#module_Forum">Forum</a></dt>
<dd><p>The Forum class is the main entry point for the backend application.</p>
</dd>
</dl>
## Typedefs
<dl>
<dt><a href="#tForumBackendConfiguration">tForumBackendConfiguration</a> : <code>object</code></dt>
<dd><p>The main configuration object for the Forum backend. It will be used to
initialize all of the sub-components. It can extend any property of
the forum object.</p>
</dd>
<dt><a href="#tJWTConfiguration">tJWTConfiguration</a> : <code>object</code></dt>
<dd><p>Configures the behavior of the JWT token.</p>
</dd>
<dt><a href="#tRethinkDBConfiguration">tRethinkDBConfiguration</a> : <code>object</code></dt>
<dd><p>Information required to connect to the rethinkDB server</p>
</dd>
</dl>
<a name="module_Forum"></a>
## Forum
The Forum class is the main entry point for the backend application.
| Param | Type | Description |
| --- | --- | --- |
| config | [<code>tForumBackendConfiguration</code>](#tForumBackendConfiguration) | the initialization options to extend the instance |
<a name="module_Forum+run"></a>
### forum.run()
Initializes the application and starts listening. Also prints a
nice robotic banner with information.
**Kind**: instance method of [<code>Forum</code>](#module_Forum)
<a name="tForumBackendConfiguration"></a>
## tForumBackendConfiguration : <code>object</code>
The main configuration object for the Forum backend. It will be used to
initialize all of the sub-components. It can extend any property of
the forum object.
**Kind**: global typedef
**Properties**
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [port] | <code>number</code> | <code>1978</code> | the port where the app will listen on |
| [staticDirectory] | <code>string</code> | <code>"static"</code> | the path, relative to the project root, where static assets live |
| [ttl] | <code>number</code> | <code>180</code> | the time in seconds that posts remain alive |
| rethinkDB | [<code>tRethinkDBConfiguration</code>](#tRethinkDBConfiguration) | | the configuration to connect to the rethinkDB server |
| jwt | [<code>tJWTConfiguration</code>](#tJWTConfiguration) | | the configuration for the JWT authentication |
<a name="tJWTConfiguration"></a>
## tJWTConfiguration : <code>object</code>
Configures the behavior of the JWT token.
**Kind**: global typedef
**Properties**
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [duration] | <code>number</code> | <code>86400</code> | the duration of the JWT in seconds |
| secret | <code>string</code> | | the secret used to sign the JWT |
<a name="tRethinkDBConfiguration"></a>
## tRethinkDBConfiguration : <code>object</code>
Information required to connect to the rethinkDB server
**Kind**: global typedef
**Properties**
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| host | <code>string</code> | | the location of the rethinkDB host |
| [post] | <code>string</code> | <code>6379</code> | port where rethinkDB server is listening |
|