roster-server 1.4.2 → 1.4.4
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
|
@@ -26,6 +26,7 @@ Your project should look something like this:
|
|
|
26
26
|
|
|
27
27
|
```
|
|
28
28
|
/srv/
|
|
29
|
+
├── greenlock.d/
|
|
29
30
|
├── roster/server.js
|
|
30
31
|
└── www/
|
|
31
32
|
├── example.com/
|
|
@@ -61,7 +62,7 @@ I'll help analyze the example files shown. You have 3 different implementations
|
|
|
61
62
|
|
|
62
63
|
1. **Basic HTTP Handler**:
|
|
63
64
|
```javascript:demo/www/example.com/index.js
|
|
64
|
-
module.exports = (
|
|
65
|
+
module.exports = (httpsServer) => {
|
|
65
66
|
return (req, res) => {
|
|
66
67
|
res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
|
|
67
68
|
res.end('"Loco de pensar, queriendo entrar en razón, y el corazón tiene razones que la propia razón nunca entenderá."');
|
|
@@ -73,7 +74,7 @@ module.exports = (server) => {
|
|
|
73
74
|
```javascript:demo/www/express.example.com/index.js
|
|
74
75
|
const express = require('express');
|
|
75
76
|
|
|
76
|
-
module.exports = (
|
|
77
|
+
module.exports = (httpsServer) => {
|
|
77
78
|
const app = express();
|
|
78
79
|
app.get('/', (req, res) => {
|
|
79
80
|
res.setHeader('Content-Type', 'text/plain; charset=utf-8');
|
|
@@ -88,8 +89,8 @@ module.exports = (server) => {
|
|
|
88
89
|
```javascript:demo/www/sio.example.com/index.js
|
|
89
90
|
const { Server } = require('socket.io');
|
|
90
91
|
|
|
91
|
-
module.exports = (
|
|
92
|
-
const io = new Server(
|
|
92
|
+
module.exports = (httpsServer) => {
|
|
93
|
+
const io = new Server(httpsServer);
|
|
93
94
|
|
|
94
95
|
io.on('connection', (socket) => {
|
|
95
96
|
console.log('A user connected');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports = (
|
|
1
|
+
module.exports = (httpsServer) => {
|
|
2
2
|
return (req, res) => {
|
|
3
3
|
res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
|
|
4
4
|
res.end('"Loco de pensar, queriendo entrar en razón, y el corazón tiene razones que la propia razón nunca entenderá."');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports = (
|
|
1
|
+
module.exports = (httpsServer) => {
|
|
2
2
|
return (req, res) => {
|
|
3
3
|
res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
|
|
4
4
|
res.end('"Loco de pensar, queriendo entrar en razón, y el corazón tiene razones que la propia razón nunca entenderá."');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "roster-server",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"description": "👾 RosterServer - A domain host router to host multiple HTTPS.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
"hosting",
|
|
20
20
|
"ssl",
|
|
21
21
|
"host",
|
|
22
|
+
"vhost",
|
|
23
|
+
"virtual-host",
|
|
24
|
+
"socket.io",
|
|
25
|
+
"websocket",
|
|
26
|
+
"express",
|
|
22
27
|
"greenlock-express",
|
|
23
28
|
"clasen"
|
|
24
29
|
],
|