-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
executable file
·44 lines (37 loc) · 878 Bytes
/
config.js
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
var fs = require('fs')
, path = require('path')
// Create a directory to store data which will be used
// to restore the server in case of crash.
var storeDir = path.join(__dirname, 'tmp')
if (!fs.existsSync(storeDir)) fs.mkdirSync(storeDir)
module.exports = {
servers: [
// Start the HTTP server running on port 8000
// and serving static files from `./pages`
{
type: 'http',
config: {
port: 8000,
staticDir: path.join(__dirname, 'pages')
}
},
// Start the websockets server running on the same port as the HTTP server
{
type: 'websockets',
config: {
port: 8000
}
},
// Start the OSC server on port 9000
{
type: 'osc',
config: {
port: 9000
}
}
],
// Configure data to be stored in `./tmp`
connections: {
store: storeDir,
}
}