tlsd 2.11.0 → 2.11.1

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.
Files changed (3) hide show
  1. package/README.md +3 -5
  2. package/package.json +1 -1
  3. package/tlsd.js +6 -8
package/README.md CHANGED
@@ -25,7 +25,7 @@ run it this way:
25
25
 
26
26
  npx tlsd
27
27
 
28
- This way you can just use it to serve your local project in dev or production mode.
28
+ This way you can just use it to serve your local project in dev or TLS mode.
29
29
 
30
30
 
31
31
  ## tlsd init
@@ -65,7 +65,7 @@ Adds a domain to Greenlock so that you can serve site with HTTPS:
65
65
  Displays the current version of tlsd
66
66
 
67
67
 
68
- ### Production Mode
68
+ ### TLS Mode
69
69
 
70
70
  In HTTPS mode, you must specify the dir containing links/dirs for domains to serve
71
71
  it will run on HTTP on 80 (redirecting to 443), HTTPS on 443, and magically
@@ -79,9 +79,7 @@ You must also add your domain to greenlock before running nodes or it won't be r
79
79
 
80
80
  npx greenlock add --subject example.com --altnames example.com,www.example.com
81
81
 
82
- Production mode serves files with Letsencrypt SSL certs magically.
83
-
84
- The browser reload feature does not operate in production mode.
82
+ TLS mode serves files with Letsencrypt SSL certs magically.
85
83
 
86
84
 
87
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tlsd",
3
- "version": "2.11.0",
3
+ "version": "2.11.1",
4
4
  "description": "A server for web app prototyping with HTTPS and Websockets",
5
5
  "main": "tlsd.js",
6
6
  "bin": {
package/tlsd.js CHANGED
@@ -1,8 +1,6 @@
1
1
 
2
- /*
3
- Copyright 2023 Sleepless Software Inc.
4
- All Rights Reserved
5
- */
2
+ //Copyright 2024 Sleepless Software Inc.
3
+ //All Rights Reserved
6
4
 
7
5
  const { path, http, https, fs, crypto, tls, } = require( "allcore" );
8
6
 
@@ -23,7 +21,7 @@ function usage() {
23
21
  const base = path.basename( module.filename );
24
22
  log(
25
23
  `Usage:
26
- Production mode:
24
+ TLS mode:
27
25
  DOMAINS_ROOT=./my_domains MAINTAINER_EMAIL=foo@bar.com VERBOSITY=4 node ` + base + `
28
26
  Dev mode:
29
27
  node ` + base + ` site_root listen_port verbosity
@@ -141,12 +139,12 @@ const basic_handler = function( root ) {
141
139
  return
142
140
  }
143
141
 
144
- // Only allow POSTS to /rpc in production mode.
142
+ // Only allow POSTS to /rpc in tlsd mode.
145
143
  // In dev mode, GET is allowed as well with query args.
146
144
  let input = body;
147
145
  if( method != "POST" ) {
148
146
  if( ! ( method == "GET" && dev_mode ) ) {
149
- W( "GET /rpc is disallowed in production mode" );
147
+ W( "GET /rpc is disallowed in tlsd mode" );
150
148
  res.writeHead( 405 ); // Method Not Allowed
151
149
  res.end();
152
150
  return;
@@ -407,7 +405,7 @@ if( argv.length == 2 ) {
407
405
  if( DOMAINS_ROOT && MAINTAINER_EMAIL && VERBOSITY ) {
408
406
  L( toInt( VERBOSITY ) );
409
407
 
410
- I( "=== PRODUCTION MODE ===" );
408
+ I( "=== TLS MODE ===" );
411
409
  V( "DOMAINS_ROOT: " + DOMAINS_ROOT );
412
410
  V( "MAINTAINER_EMAIL: " + MAINTAINER_EMAIL );
413
411
  V( "VERBOSITY: " + VERBOSITY );