daveappserver 0.6.39 → 0.6.41

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/appserver.js CHANGED
@@ -1,4 +1,4 @@
1
- var myVersion = "0.6.39", myProductName = "daveAppServer";
1
+ var myVersion = "0.6.41", myProductName = "daveAppServer";
2
2
 
3
3
  exports.start = startup;
4
4
  exports.notifySocketSubscribers = notifySocketSubscribers;
@@ -45,6 +45,7 @@ var config = {
45
45
  blockedAddresses: [],
46
46
  flForceTwitterLogin: true,
47
47
  flUseTwitterIdentity: false, //2/6/23 by DW
48
+ flTraceOnError: false, //8/15/23 by DW
48
49
 
49
50
  flStorageEnabled: true,
50
51
  privateFilesPath: "privateFiles/users/",
@@ -1309,6 +1310,7 @@ function startup (options, callback) {
1309
1310
  config.twitter.flLogToConsole = config.flLogToConsole;
1310
1311
  config.twitter.flAllowAccessFromAnywhere = config.flAllowAccessFromAnywhere;
1311
1312
  config.twitter.flPostEnabled = config.flPostEnabled;
1313
+ config.twitter.flTraceOnError = config.flTraceOnError; //8/15/23 by DW
1312
1314
  config.twitter.blockedAddresses = config.blockedAddresses;
1313
1315
  config.twitter.httpRequestCallback = httpRequestCallback;
1314
1316
  config.twitter.http404Callback = http404Callback; //1/24/21 by DW
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "daveappserver",
3
3
  "description": "Factored code that was appearing in all my servers.",
4
- "version": "0.6.39",
4
+ "version": "0.6.41",
5
5
  "main": "appserver.js",
6
6
  "repository": {
7
7
  "type" : "git",
package/readme.md ADDED
@@ -0,0 +1,78 @@
1
+ # appserver
2
+
3
+ A new release of nodeStorage that removes all the historical addons, streamlines configuration, only serves from the local file system, and serves the home page of the app. It could be thought of as v2.0 of nodeStorage except it is not backward compatible.
4
+
5
+ ### Overview
6
+
7
+ Over the years nodeStorage got a lot of appendages and add-ons that most apps don't use.
8
+
9
+ The configuration file was confusing and not well documented.
10
+
11
+ It was one of the first things I wrote for Node, and I learned a lot over time.
12
+
13
+ FInally when one of my programming partners had difficulty understanding the code, I realizaed I did too, and decided to rebuild it from scratch using components I had already developed, such as davehttp, davetwitter, etc.
14
+
15
+ I have converted Little Outliner to use this backend. The app was only modified in how it's configured. Everything else remains the same. It uses the same api glue file that it used to access nodeStorage.
16
+
17
+ ### Configuring
18
+
19
+ Below is an example of config.json file that goes in the same directory as the appserver.js file.
20
+
21
+ ### Example
22
+
23
+ ```json
24
+
25
+ ### Explanation
26
+
27
+ The first section provides configuration information about and to the app that's running on the server's home page.
28
+
29
+ 1. productName is an id that can be used to identify the product. No specified use.
30
+
31
+ 2. productNameForDisplay is what the app should use in its user interface.
32
+
33
+ 3. urlServerHomePageSource is the address of an HTML page that is served through the home page of the server. It can contain macros that plug in values from the server.
34
+
35
+ 4. prefsPath is the name of the prefs file for the app. This is the file you should read and save to, to maintain the state of the app for the user.
36
+
37
+ 5. docsPath is where the documents for this app are stored in the user's storage on the server.
38
+
39
+ 6. urlServerForClient is the address the app uses to call back to the server.
40
+
41
+ 7. urlWebsocketServerForClient is the address of the web socket that reports on changes to files stored on the server. This address can be included in the app files so that apps that read the files can subbscribe to changes.
42
+
43
+ The second section configures the HTTP server and the connection to Twitter for identity.
44
+
45
+ 1. port is the port the HTTP server will run on, unless process.env.PORT is specified. It overrides the port choice in the config file.
46
+
47
+ 2. flWebsocketEnabled, a boolean, determines whether or not we initialize the websocket server, if it's true then websocketPort is the port it's listening on.
48
+
49
+ 3. myDomain, the domain assigned to this app. It's the domain you'd use to access the home page. If that includes a port, include the port in this value.
50
+
51
+ 4. twitterConsumerKey and twitterConsumerSecret are the values that identify the app for Twitter, as assigned on developer.twitter.com.
52
+
53
+ ### Updates
54
+
55
+ #### v0.5.48 -- 3/18/22 by DW
56
+
57
+ Exports three routines: fileExists, readWholeFile, writeWholeFile.
58
+
59
+ #### v0.5.44 -- 3/18/22 by DW
60
+
61
+ New callback, config.publishFile. If defined we call back with the file, screenname, relpath, flprivate, filetext and the url of the file if it's public.
62
+
63
+ It's called when we handle a /publishfile or /writewholefile message.
64
+
65
+ #### v0.5.32 -- 12/4/21 by DW
66
+
67
+ Added a new callback, publicFileSaved, which is called when the user updates a public file.
68
+
69
+ Fixed a bug where a user couldn't create a new file if their public files folder was empty.
70
+
71
+ #### v0.5.32 -- 9/26/21 by DW
72
+
73
+ Fixed the example app to require "../appserver.js" instead of "lib/daveappserver.js" which only exists on my development machine.
74
+
75
+ #### v0.5.31 -- 9/15/21 by DW
76
+
77
+ writeWholeFile was meant to be sure the path to the file exists before writing the file. It wasn't doing it, now it does.
78
+
package/readme.opml ADDED
@@ -0,0 +1,67 @@
1
+ <?xml version="1.0" encoding="ISO-8859-1"?>
2
+ <opml version="2.0">
3
+ <head>
4
+ <title>readme.md</title>
5
+ <dateModified>Sat, 28 May 2022 18:55:48 GMT</dateModified>
6
+ <expansionState></expansionState>
7
+ <vertScrollState>1</vertScrollState>
8
+ <windowTop>300</windowTop>
9
+ <windowLeft>700</windowLeft>
10
+ <windowBottom>900</windowBottom>
11
+ <windowRight>1500</windowRight>
12
+ </head>
13
+ <body text="readme.md">
14
+ <outline text="# appserver">
15
+ <outline text="A new release of nodeStorage that removes all the historical addons, streamlines configuration, only serves from the local file system, and serves the home page of the app. It could be thought of as v2.0 of nodeStorage except it is not backward compatible. "></outline>
16
+ </outline>
17
+ <outline text="### Overview">
18
+ <outline text="Over the years nodeStorage got a lot of appendages and add-ons that most apps don't use. "></outline>
19
+ <outline text="The configuration file was confusing and not well documented."></outline>
20
+ <outline text="It was one of the first things I wrote for Node, and I learned a lot over time."></outline>
21
+ <outline text="FInally when one of my programming partners had difficulty understanding the code, I realizaed I did too, and decided to rebuild it from scratch using components I had already developed, such as davehttp, davetwitter, etc. "></outline>
22
+ <outline text="I have converted Little Outliner to use this backend. The app was only modified in how it's configured. Everything else remains the same. It uses the same api glue file that it used to access nodeStorage. "></outline>
23
+ </outline>
24
+ <outline text="### Configuring">
25
+ <outline text="Below is an example of config.json file that goes in the same directory as the appserver.js file."></outline>
26
+ </outline>
27
+ <outline text="### Example">
28
+ <outline text="&lt;%includeExample (&quot;example1&quot;)%&gt;"></outline>
29
+ </outline>
30
+ <outline text="### Explanation">
31
+ <outline text="The first section provides configuration information about and to the app that's running on the server's home page. ">
32
+ <outline text="1. productName is an id that can be used to identify the product. No specified use."></outline>
33
+ <outline text="2. productNameForDisplay is what the app should use in its user interface."></outline>
34
+ <outline text="3. urlServerHomePageSource is the address of an HTML page that is served through the home page of the server. It can contain macros that plug in values from the server. "></outline>
35
+ <outline text="4. prefsPath is the name of the prefs file for the app. This is the file you should read and save to, to maintain the state of the app for the user. "></outline>
36
+ <outline text="5. docsPath is where the documents for this app are stored in the user's storage on the server."></outline>
37
+ <outline text="6. urlServerForClient is the address the app uses to call back to the server. "></outline>
38
+ <outline text="7. urlWebsocketServerForClient is the address of the web socket that reports on changes to files stored on the server. This address can be included in the app files so that apps that read the files can subbscribe to changes. "></outline>
39
+ </outline>
40
+ <outline text="The second section configures the HTTP server and the connection to Twitter for identity. ">
41
+ <outline text="1. port is the port the HTTP server will run on, unless process.env.PORT is specified. It overrides the port choice in the config file."></outline>
42
+ <outline text="2. flWebsocketEnabled, a boolean, determines whether or not we initialize the websocket server, if it's true then websocketPort is the port it's listening on. "></outline>
43
+ <outline text="3. myDomain, the domain assigned to this app. It's the domain you'd use to access the home page. If that includes a port, include the port in this value."></outline>
44
+ <outline text="4. twitterConsumerKey and twitterConsumerSecret are the values that identify the app for Twitter, as assigned on developer.twitter.com. "></outline>
45
+ </outline>
46
+ </outline>
47
+ <outline created="Wed, 15 Sep 2021 14:19:02 GMT" text="### Updates">
48
+ <outline created="Sat, 28 May 2022 18:54:36 GMT" text="#### v0.5.48 -- 3/18/22 by DW">
49
+ <outline created="Sat, 28 May 2022 18:54:39 GMT" text="Exports three routines: fileExists, readWholeFile, writeWholeFile."></outline>
50
+ </outline>
51
+ <outline created="Fri, 18 Mar 2022 14:21:28 GMT" text="#### v0.5.44 -- 3/18/22 by DW">
52
+ <outline created="Fri, 18 Mar 2022 14:21:59 GMT" text="New callback, config.publishFile. If defined we call back with the file, screenname, relpath, flprivate, filetext and the url of the file if it's public."></outline>
53
+ <outline created="Fri, 18 Mar 2022 14:22:36 GMT" text="It's called when we handle a /publishfile or /writewholefile message."></outline>
54
+ </outline>
55
+ <outline created="Sat, 04 Dec 2021 21:29:57 GMT" text="#### v0.5.32 -- 12/4/21 by DW">
56
+ <outline created="Sat, 04 Dec 2021 21:30:33 GMT" text="Added a new callback, publicFileSaved, which is called when the user updates a public file. "></outline>
57
+ <outline created="Sat, 04 Dec 2021 21:29:58 GMT" text="Fixed a bug where a user couldn't create a new file if their public files folder was empty. "></outline>
58
+ </outline>
59
+ <outline created="Wed, 15 Sep 2021 14:19:10 GMT" text="#### v0.5.32 -- 9/26/21 by DW">
60
+ <outline created="Wed, 15 Sep 2021 14:19:12 GMT" text="Fixed the example app to require &quot;../appserver.js&quot; instead of &quot;lib/daveappserver.js&quot; which only exists on my development machine. "></outline>
61
+ </outline>
62
+ <outline created="Wed, 15 Sep 2021 14:19:10 GMT" text="#### v0.5.31 -- 9/15/21 by DW">
63
+ <outline created="Wed, 15 Sep 2021 14:19:12 GMT" text="writeWholeFile was meant to be sure the path to the file exists before writing the file. It wasn't doing it, now it does. "></outline>
64
+ </outline>
65
+ </outline>
66
+ </body>
67
+ </opml>