roster-server 1.4.6 → 1.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -42,7 +42,7 @@ Your project should look something like this:
42
42
  const Roster = require('roster-server');
43
43
 
44
44
  const options = {
45
- maintainerEmail: 'admin@example.com',
45
+ email: 'admin@example.com',
46
46
  greenlockStorePath: '/srv/greenlock.d', // Path to your Greenlock configuration directory
47
47
  wwwPath: '/srv/www' // Path to your 'www' directory (default: '../www')
48
48
  };
@@ -138,7 +138,7 @@ Add a new site? Just drop it into the `www` folder with an `index.js` file, and
138
138
 
139
139
  When creating a new `RosterServer` instance, you can pass the following options:
140
140
 
141
- - `maintainerEmail` (string): Your email for Let's Encrypt notifications.
141
+ - `email` (string): Your email for Let's Encrypt notifications.
142
142
  - `wwwPath` (string): Path to your `www` directory containing your sites.
143
143
  - `greenlockStorePath` (string): Directory for Greenlock configuration.
144
144
  - `staging` (boolean): Set to `true` to use Let's Encrypt's staging environment (for testing).
@@ -2,7 +2,7 @@ const Roster = require('../../index.js');
2
2
  const path = require('path');
3
3
 
4
4
  const roster = new Roster({
5
- maintainerEmail: 'admin@example.com',
5
+ email: 'admin@example.com',
6
6
  wwwPath: path.join(__dirname, '..', 'www'),
7
7
  });
8
8
 
@@ -1,6 +1,6 @@
1
1
  const { Server } = require('socket.io');
2
2
 
3
- module.exports = (httpsServer) => {
3
+ const app = (httpsServer) => {
4
4
  const io = new Server(httpsServer);
5
5
 
6
6
  io.on('connection', (socket) => {
@@ -21,4 +21,10 @@ module.exports = (httpsServer) => {
21
21
  res.writeHead(200);
22
22
  res.end('Socket.IO server running');
23
23
  };
24
- };
24
+ };
25
+
26
+ app.config = {
27
+ port: 3334,
28
+ };
29
+
30
+ module.exports = app;
package/index.js CHANGED
@@ -4,7 +4,7 @@ const Greenlock = require('greenlock-express');
4
4
 
5
5
  class Roster {
6
6
  constructor(options = {}) {
7
- this.maintainerEmail = options.maintainerEmail || 'admin@example.com';
7
+ this.email = options.email || 'admin@example.com';
8
8
  const basePath = options.basePath || path.join(__dirname, '..', '..', '..');
9
9
  this.wwwPath = options.wwwPath || path.join(basePath, 'www');
10
10
  this.greenlockStorePath = options.greenlockStorePath || path.join(basePath, 'greenlock.d');
@@ -114,7 +114,7 @@ class Roster {
114
114
  renewStagger: "3d",
115
115
  accountKeyType: "EC-P256",
116
116
  serverKeyType: "RSA-2048",
117
- subscriberEmail: this.maintainerEmail
117
+ subscriberEmail: this.email
118
118
  },
119
119
  sites: sitesConfig
120
120
  };
@@ -188,7 +188,7 @@ class Roster {
188
188
  const greenlock = Greenlock.init({
189
189
  packageRoot: __dirname,
190
190
  configDir: this.greenlockStorePath,
191
- maintainerEmail: this.maintainerEmail,
191
+ maintainerEmail: this.email,
192
192
  cluster: this.cluster,
193
193
  staging: this.staging
194
194
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "roster-server",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "description": "👾 RosterServer - A domain host router to host multiple HTTPS.",
5
5
  "main": "index.js",
6
6
  "scripts": {