Git Product home page Git Product logo

tiddlyserver's Introduction

My work on tools related to TiddlyWiki is entirely a side project for me that does not generate any income. If you want to help cover the cost of the time it takes to make these tools, you are welcome to donate at https://www.paypal.me/Arlen22.

TiddlyServer 2.2

https://arlen22.github.io/tiddlyserver/

TiddlyServer takes the server command of TiddlyWiki on NodeJS and adds it to a static file server. This means you can load and serve any TiddlyWiki data folder in the same way you can serve a single file TiddlyWiki.

Notes for 2.2

  • You can run npm install -g tiddlyserver and everything will be installed properly. Installation instructions are below.
  • The terms "settings.json" and "config file" both refer to the same thing. I'm changing the terminology to keep things simple, because the config file can be specified as a command line option tiddlyserver --config settings.json.
  • Logging to file has been removed, as it was not completely consistent anyway. Instead you can use a process manager such as PM2 to capture stdout and stderr to file.

Benefits

  • Open single-file wikis and data folder wikis with a single click.
  • Allows you to access your wikis from any computer on the network.
  • Files save and load instantly on the same computer, and quickly across the network.
  • Mount any location on your computer (in theory anything NodeJS can stat).

Features

  • Uses a folder structure specified in settings.json allowing you serve any folders on the filesystem in whatever tree structure you like.
  • Serves all files found in the folder structure.
  • Saves individual files using the put saver.
  • Allows you to upload a file to any directory (but not categories), or create new directories and data folders.
    • Want to make a new data folder? First create a directory, then upload your tiddlywiki.info file to it.
  • Loads data folders using TiddlyWiki then forwards all requests to the listen command. All data folders are mounted on the path they are found at (e.g. /personal/mydatafolder)
  • Saves a backup of the original everytime a single-file TiddlyWiki is saved (if a backup folder is specified in the settings file).

Installation

Global install using NPM

  • Install TiddlyServer globally using npm install tiddlyserver -g.
  • Create your config file.
  • Run tiddlyserver --config ~/path/to/settings.json. Additional options are [--stay-on-error] [--dry-run].
  • All paths in the config are relative to the config file. The working directory is not used by TiddlyServer for anything. TiddlyWiki Data Folders do not use the working directory for anything either.

Portable install

  • Create a new folder and cd into the folder or open it in your favorite terminal.ย 
  • Run npm init -y to quickly create a package.json file.
  • Run "npm install tiddlyserver --save-exact".
    • Notice there is no -g option there.
  • Create your config file.
  • Test it by running npx tiddlyserver --config settings.json.
  • Create your bash or batch file with the following command.
    • "node node_modules/tiddlyserver/index.js --config settings.json"
  • You can also download the Node executable and put in in the directory for a truly portable install.
    • Windows CMD will use this immediately, but bash and other shells usually require you to change the command node to ./node.

How to upgrade

Upgrading is simple. Just follow the installation instructions as usual, then copy your settings.json file from your old installation to your new one. If upgrading from 2.0.x to 2.1.x, just use the example-settings.json file as your starting point and copy the tree over from your old settings file.

Getting started

See the Getting Started Guide and the man page in the docs directory.

FAQ

If these do not answer your question, feel free to open an issue or ask on the TiddlyWiki Google Group.

TiddlyServer throws a Syntax Error on start up

The minimum Node version required is

  • TiddlyServer 2.0: Node v6
  • TiddlyServer 2.1: Node v8
  • TiddlyServer 2.2: Node v10

Questions or Comments?

  • Feature requests! If you have a feature you would like to see, open an issue and I will see what I can do. I see many possibilities with this app, and your requests will show me where to focus next.
  • If you see a bug, please open an issue describing what is going on and I will try to answer it. Including the console output from the server is very useful to me. The browser console or network request log may contain clues as well.

A final thought

If you want to help cover the cost of making this all happen, use https://www.paypal.me/Arlen22. Your help is appreciated and will increase the likelihood of future improvements.

tiddlyserver's People

Contributors

arlen22 avatar dependabot[bot] avatar enzime avatar ibnishak avatar r1chard5mith avatar raybb avatar someguynamedmatt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tiddlyserver's Issues

Having trouble getting started

I am entirely new to TiddlyServer. I'm running Ubuntu 16.04.3 and using Firefox and Chrome. Since I don't know my way around, I'm following your README and the instructions at https://www.didaxy.com/introduction-to-tiddlyserver closely to hold as many things constant as I can.

I have downloaded and installed node.js 8.9.4 by adding the Nodesource repo to my repo list, and I have downloaded and unzipped the source code for the 2.0.11 release:

  https://github.com/Arlen22/TiddlyServer/archive/2.0.11.tar.gz

I created a simple settings.json file:

{
  "tree" : {
    "WorkNotes" : "/home/dubitron/Desktop/Tiddlers/WorkNotes/"
  },
  "types" : {
    "htmlfile" : ["html", "htm"]
  },
  "username" : "",
  "password" : "",
  "host" : "127.0.0.1",
  "port" : "8181",
  "backupDirectory" : "backup"
}

The WorkNotes directory contains a 5.1.7 TiddlyWiki WorkNotes.html I have used for quite a while with TiddlyFox.

From within the TiddlyServer source dir I run the node server (in a screen session for convenience):

screen -S tserv node server.js

which results in the following output in the screen session:

Settings file: /home/cfbearden/opt/TiddlyServer-2.0.11/settings.json
Open your browser and type in one of the following:
127.0.0.1:8181

I can navigate to and view the TiddlyWiki through the node server, but I can't save changes to it. When I click on the Save iconi, I'm prompted with the download Save dialog, which is the same behavior as when I edit the TiddlyWiki via a file:/// path.

  • What am I doing wrong?
  • Do I need any of the other files in the release (editions-server.zip, editions.zip)?
  • Am I supposed to initialize the data directory somehow?
  • Do I need to install some further plugins in my TiddlyWiki?
  • Does the TiddlyWiki version need to be higher?

Thanks for any help. The idea is promising, but clearly I'm missing something.

Changing Names ...

@Arlen22 In the docs you talk about the the "bundled version". But that does NOT express what it is or how it differs from the full version.

IMO I'd rename it the "TW Runner" ... (maybe later we can think up something more elegant :-)

Uncaught error on start up. First argument must be a string or buffer

Error message

APP  2018-03-02 06:01:10  Uncaught error in the server route: First argument must be a string or Buffer
APP  2018-03-02 06:01:10  TypeError: First argument must be a string or Buffer

Settings file

{
    "tree": {
        "empty": "../Empty.html"
        },
    "types":{
        "htmlfile": ["htm", "html"]
    },
    "username": "",
    "password": "",
    "host": "127.0.0.1",
    "port": 8080,
    "backupDirectory": "", 
    "etagWindow": 0,
    "etag": "",
    "useTW5path" : false
}

OS: Ubuntu 17.10
Node version: 9.6.1

I am now recieving 412 Errors again despite an etag or 3 then 8

Arlen,

Suddenly I am getting 412 errors as below on the console, which stop me saving the whole wiki, on more than one TiddlyServer served wiki. I am using latest general release FireFox and I recently re-installed TiddlyServer-2.0.14

412 ifmatch "1125899906917436-7763470-1540777282000"
412 etag "1125899906917436-7810180-1540777455000"
412 caused by difference in size
412 caused by difference in modified

In this case it seems to be a size error. My Single File Wiki is currently less than 8MB in size.

I will refresh the browser and restart my Windows 10 desktop to see if this helps and will add a comment if it does not reoccur.

Data folders crashing on Termux

I get the following error when attempting to open data folders with TS on termux. Single files seem (so far) to save OK.

Is there something I need to do/tweak to make this work?

Thank you!
-- Mark

{ Error: Cannot find module '../../TiddlyWiki5-Jermolene/boot/boot.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:649:15)
at Function.Module._load (internal/modules/cjs/loader.js:575:25)
at Module.require (internal/modules/cjs/loader.js:705:19)
at require (internal/modules/cjs/helpers.js:14:16)
at loadDataFolderTiddlyWiki (/storage/emulated/0/Download/TiddlyServer-2.0.14/src/datafolder.js:142:17)
at a.server_types_1.obs_readFile.subscribe [as _next] (/storage/emulated/0/Download/TiddlyServer-2.0.14/src/datafolder.js:132:13)
at a.__tryOrUnsub (/storage/emulated/0/Download/TiddlyServer-2.0.14/lib/Rx.min.js:43:377)
at a.next (/storage/emulated/0/Download/TiddlyServer-2.0.14/lib/Rx.min.js:42:227)
at a._next (/storage/emulated/0/Download/TiddlyServer-2.0.14/lib/Rx.min.js:40:393)
at a.next (/storage/emulated/0/Download/TiddlyServer-2.0.14/lib/Rx.min.js:40:64)
at cb (/storage/emulated/0/Download/TiddlyServer-2.0.14/src/server-types.js:617:14)
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:54:3) code: 'MODULE_NOT_FOUND' }
caught process uncaughtException
closing server

Cannot start server: address in use?

I'm trying to set up TiddlyServer on a home file/web server I have running Ubuntu 16.04. Whenever I try to start TiddlyServer I get an error message stating that my address is in use. I've verified the port is available both via netstat and by starting basic web servers on it, e.g. python3 -m http.server 8083. Any recommendations? I've tried installing both from the release bundle as well as cloning the repo directly.

The error:

Settings file: /opt/tiddlywiki/settings.json
{ Error: listen EADDRINUSE 0.0.0.0:8083
    at Object._errnoException (util.js:999:13)
    at _exceptionWithHostPort (util.js:1020:20)
    at Server.setupListenHandle [as _listen2] (net.js:1379:14)
    at listenInCluster (net.js:1420:12)
    at doListen (net.js:1535:7)
    at process._tickCallback (internal/process/next_tick.js:152:19)
    at Function.Module.runMain (module.js:703:11)
    at startup (bootstrap_node.js:194:16)
    at bootstrap_node.js:618:3
  errno: 'EADDRINUSE',
  code: 'EADDRINUSE',
  syscall: 'listen',
  address: '0.0.0.0',
  port: 8083 }
caught process uncaughtException
closing server

My settings.json:

{
        "tree": {
                "data": "/files/tiddlywiki"
        },
        "username": "[...]",
        "password": "[...]",
        "host": "0.0.0.0",
        "port":8083
}

Make backupDirectory unique for each served single file TiddlyWiki

Given that i'm completely new both to node.js and TiddlyWiki pls forgive me if i'm telling some oddity.

I'm still experimenting to see what kind of beast i've got (syntax, macros, widgets and mostly its philosophy that i don't yet completely grasp) and i found really useful making one or more copy of a master wiki file and apply different changes to the different copies just to see the differences, then apply what i like most to the master copy.
Then i delete the copies and make them new from the master with the same names (so i don't have to change settings.json) and restart the cycle.

The problem is that when i delete a copy, the unique backupDirectory remain polluted with backups that are no longer usable and must be deleted manually.

Would it be possible to have the backupDirectory relative to the tree so that each single file instance can have its own?

This would help at least in two ways, one, with this usage pattern, i could delete with a single action both the instance and the backups, second having the each backupDirectory together with its file instance will allow to backup easily them together.

Thanks,
Gabriele

How can I contribute?

Hello,

Thanks so much for making this great program. I've found it really useful and I hope to see it grow and keep doing well. As such, I was wondering if there's any way you could use help on this repo? I'm gonna have some free time the rest of this month and would love to contribute. I'm quite familiar with node and have used typescript before so I should be able to jump in without too much trouble.

I have a few ideas for things that might be helpful but I'd like to know what your priorities for the repo and what would be most useful to you.

Let me know! Thanks

[v2.1.0beta] Error while accessing Tiddlywiki Folder

Hi Arlen22.

I'm back again, still trying to have v2.1beta working. It seems it fails while trying to access a Tiddlywiki folder.

Here is my settings.json:

{
  "tree": {
    "$element": "group",
    "$children": {
      "NSlab": "O:\\github\\twlab\\NSlab\\wiki"
    }
  },
  "bindInfo": {
    "bindAddress": [
      "127.0.0.1"
    ],
    "filterBindAddress": false,
    "enableIPv6": false,
    "port": 27768,
    "bindWildcard": false,
    "hostLevelPermissions": {
      "localhost": {
        "mkdir": false,
        "upload": false,
        "settings": false,
        "WARNING_all_settings_WARNING": false
      },
      "*": {
        "mkdir": false,
        "upload": false,
        "settings": false,
        "WARNING_all_settings_WARNING": false
      }
    },
    "https": false,
    "_bindLocalhost": false
  },
  "logging": {
    "logColorsToFile": false,
    "logToConsoleAlso": false,
    "debugLevel": -1
  },
  "putsaver": {
    "etag": "",
    "etagWindow": 0,
    "backupDirectory": ""
  },
  "authAccounts": {},
  "directoryIndex": {
    "defaultType": "html",
    "icons": {
      "htmlfile": [
        "htm",
        "html"
      ]
    }
  },
  "EXPERIMENTAL_clientside_datafolders": {
    "enabled": false,
    "alwaysRefreshCache": true,
    "maxAge_tw_plugins": 31536000000
  },
  "authCookieAge": 2592000,
  "$schema": "./settings.schema.json"
}

And here are stdout+stderr from TiddlyServer...

... starting the server:

Settings file: K:\MK\opt64\TiddlyServer-2.1.0-beta\settings.json
$ref: keywords ignored in schema at path "#/additionalProperties"
TYPE: settings.bindInfo.https should be string
ADDITIONALPROPERTIES: settings.bindInfo.hostLevelPermissions['localhost'] should NOT have additional properties
ADDITIONALPROPERTIES: settings.bindInfo.hostLevelPermissions['localhost'] should NOT have additional properties
REQUIRED: settings.bindInfo.hostLevelPermissions['localhost'] should have required property 'writeErrors'
REQUIRED: settings.bindInfo.hostLevelPermissions['localhost'] should have required property 'websockets'
REQUIRED: settings.bindInfo.hostLevelPermissions['localhost'] should have required property 'registerNotice'
ADDITIONALPROPERTIES: settings.bindInfo.hostLevelPermissions['*'] should NOT have additional properties
ADDITIONALPROPERTIES: settings.bindInfo.hostLevelPermissions['*'] should NOT have additional properties
REQUIRED: settings.bindInfo.hostLevelPermissions['*'] should have required property 'writeErrors'
REQUIRED: settings.bindInfo.hostLevelPermissions['*'] should have required property 'websockets'
REQUIRED: settings.bindInfo.hostLevelPermissions['*'] should have required property 'registerNotice'
REQUIRED: settings.logging should have required property 'logAccess'
REQUIRED: settings.logging should have required property 'logError'
REQUIRED: settings.directoryIndex should have required property 'mixFolders'
32 32 64 16
 APP 2019-04-16 17:37:51 server 127.0.0.1 listening
Open your browser and type in one of the following:
http://127.0.0.1:27768

... opening browser on http://127.0.0.1:27768:

[2019-04-16T17:38:42.135+-200] GET     127.0.0.1       200 127.0.0.1 /                                                           27.269 ms - 5847
[2019-04-16T17:38:42.174+-200] GET     127.0.0.1       304 127.0.0.1 /directory.css                                              14.050 ms - -
[2019-04-16T17:38:42.177+-200] GET     127.0.0.1       304 127.0.0.1 /assets/icons/datafolder.png                                10.112 ms - -

... trying to open my test wiki:

[2019-04-16T17:38:57.105+-200] GET     127.0.0.1       302 127.0.0.1 /NSlab                                                      9.186 ms - -
{ Error: Cannot find module '..\..\_reference\TiddlyWiki5-Arlen22/boot/boot.js'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at loadDataFolderTiddlyWiki (K:\MK\opt64\TiddlyServer-2.1.0-beta\src\datafolder.ts:180:14)
    at a.server_types_1.obs_readFile.subscribe [as _next] (K:\MK\opt64\TiddlyServer-2.1.0-beta\src\datafolder.ts:164:4)
    at a.__tryOrUnsub (K:\MK\opt64\TiddlyServer-2.1.0-beta\lib\Rx.min.js:43:377)
    at a.next (K:\MK\opt64\TiddlyServer-2.1.0-beta\lib\Rx.min.js:42:227)
    at a._next (K:\MK\opt64\TiddlyServer-2.1.0-beta\lib\Rx.min.js:40:393)
    at a.next (K:\MK\opt64\TiddlyServer-2.1.0-beta\lib\Rx.min.js:40:64)
    at cb (K:\MK\opt64\TiddlyServer-2.1.0-beta\src\server-types.ts:820:10)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3) code: 'MODULE_NOT_FOUND' }
caught process uncaughtException

The browser waits long for the page to be loaded, with no results. I did not found errors in the browser console.

Tested with Win 10 64 bit + Chrome 73 + Node.js 10.15.3.

Thanks in advance for your help and for your patience.

paths in "tree" not working?

I have "TiddlyServer" and "TiddlyWikis" in the same path and here is my settings.json:

{
"tree": {
"alias": "../TiddlyWikis",
},
"types":{
"htmlfile": ["htm", "html"]
},
"username": "",
"password": "",
"host": "0.0.0.0",
"port": 8555,
"backupDirectory": ""
}

After running node server I got:

Settings file: D:\Users\ranmaru90\Documents\Google Drive\Tools\TiddlyServer\sett
ings.json
The settings file could not be parsed correctly
SyntaxError: Unexpected token } in JSON at position 55
at JSON.parse ()
at Object. (D:\Users\ranmaru90\Documents\Google Drive\Tools\Tiddl
yServer\server.js:29:21)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Function.Module.runMain (module.js:665:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:607:3
caught process uncaughtException
(node:3152) [DEP0013] DeprecationWarning: Calling an asynchronous function witho
ut callback is deprecated.

But if I let "tree" be an empty object, the it runs but without the list.

iron is no longer used

TiddlyServer/lib/iron/ does not appear to be used anywhere in the project.

If it's safe to remove we should get rid of it. I can make a PR if that's easier for you.

412 errors all the time due to modified time

I've just updated from TiddlyServer 2.0.8 to 2.0.11 and I've started getting very frequent 412 errors with an accompanying message on the console about "difference in modified".

I've tried this both with a file under Dropbox and one on the local filesystem and I get the same results. I can't be totally sure, but it seems like what's happening is that the first time I save a given wiki, it works ok, but subsequent attempts to save always result in the mtime conflict. It's as if the browser version isn't updating the etag after the first save goes through, so the FS version is then newer?

This is making the current version nearly unusable for me :-(

I'm on FF58.0.2 on Arch Linux if that makes a difference. Node 8.7.0.

[v2.1.1-beta] Don't understand where tiddlers are saved (if saved)

Hi Arlen,

it seems that I'm not able to save tiddlers or at least I don't understand if they are written somewhere (and where?)

My environment is made up by Windows 10 + Node.js 10.15.3 + Chrome 73.

This is my config:

{
  "tree": {
    "$element": "group",
    "$children": {
      "NSlab": "O:\\github\\twlab\\NSlab\\wiki"
    }
  },
  "bindInfo": {
    "bindAddress": [
      "127.0.0.1"
    ],
    "filterBindAddress": false,
    "enableIPv6": false,
    "port": 27768,
    "bindWildcard": false,
    "hostLevelPermissions": {
      "localhost": {
        "mkdir": false,
        "upload": false,
        "settings": false,
        "WARNING_all_settings_WARNING": false
      },
      "*": {
        "mkdir": false,
        "upload": false,
        "settings": false,
        "WARNING_all_settings_WARNING": false
      }
    },
    "https": false,
    "_bindLocalhost": false
  },
  "logging": {
    "logColorsToFile": false,
    "logToConsoleAlso": false,
    "debugLevel": -1
  },
  "putsaver": {
    "etag": "",
    "etagWindow": 0,
    "backupDirectory": ""
  },
  "authAccounts": {},
  "directoryIndex": {
    "defaultType": "html",
    "icons": {
      "htmlfile": [
        "htm",
        "html"
      ]
    }
  },
  "EXPERIMENTAL_clientside_datafolders": {
    "enabled": false,
    "alwaysRefreshCache": true,
    "maxAge_tw_plugins": 31536000000
  },
  "authCookieAge": 2592000,
  "$schema": "./settings.schema.json"
}

NSlab is a brand new wiki (I started my test with an empty tiddlers folder). No plugins are loaded in tiddlywiki.info, but the Tiddlyweb plugin.

Apparently there is nothing wrong while playing with my wiki. The server starts without errors, I can navigate to my wiki (http://localhost:27768/NSlab/) and if I make changes the "save" icon above the search box blinks as usual (grey-red-grey).

On the other hand, if I look at the tiddlers folder it is empty (no trace of the tiddlers that I created, nor the $:/StoryList).

If I refresh the page I can see my tiddlers in the Recent tab, but the tiddlers folder is still empty.
If I restart the server then also the Recent tab becames empty.

Here are some extracts from server stdout/stderr.

  • Starting the server:
Settings file: K:\MK\opt64\TiddlyServer-2.1.1-beta\settings.json
$ref: keywords ignored in schema at path "#/additionalProperties"
TYPE: settings.bindInfo.https should be string
ADDITIONALPROPERTIES: settings.bindInfo.hostLevelPermissions['localhost'] should NOT have additional properties
ADDITIONALPROPERTIES: settings.bindInfo.hostLevelPermissions['localhost'] should NOT have additional properties
REQUIRED: settings.bindInfo.hostLevelPermissions['localhost'] should have required property 'writeErrors'
REQUIRED: settings.bindInfo.hostLevelPermissions['localhost'] should have required property 'websockets'
REQUIRED: settings.bindInfo.hostLevelPermissions['localhost'] should have required property 'registerNotice'
ADDITIONALPROPERTIES: settings.bindInfo.hostLevelPermissions['*'] should NOT have additional properties
ADDITIONALPROPERTIES: settings.bindInfo.hostLevelPermissions['*'] should NOT have additional properties
REQUIRED: settings.bindInfo.hostLevelPermissions['*'] should have required property 'writeErrors'
REQUIRED: settings.bindInfo.hostLevelPermissions['*'] should have required property 'websockets'
REQUIRED: settings.bindInfo.hostLevelPermissions['*'] should have required property 'registerNotice'
REQUIRED: settings.logging should have required property 'logAccess'
REQUIRED: settings.logging should have required property 'logError'
REQUIRED: settings.directoryIndex should have required property 'mixFolders'
32 32 64 16
 APP 2019-04-18 17:46:20 server 127.0.0.1 listening
Open your browser and type in one of the following:
http://127.0.0.1:27768
  • Loading the wiki in Chrome:
[2019-04-18T17:47:04.396+-200] GET     127.0.0.1       200 127.0.0.1 /NSlab/                                                     6.260 ms - -
[2019-04-18T17:47:05.311+-200] GET     127.0.0.1       200 127.0.0.1 /NSlab/status                                               4.020 ms - -
[2019-04-18T17:47:05.329+-200] OPTIONS 127.0.0.1       404 127.0.0.1 /NSlab/                                                     3.099 ms - -
[2019-04-18T17:47:05.332+-200] HEAD    127.0.0.1       404 127.0.0.1 /NSlab/                                                     2.300 ms - -
[2019-04-18T17:47:06.444+-200] GET     127.0.0.1       200 127.0.0.1 /NSlab/recipes/default/tiddlers.json                        2.705 ms - -
[2019-04-18T17:47:06.847+-200] GET     127.0.0.1       200 127.0.0.1 /NSlab/favicon.ico                                          3.528 ms - -
[2019-04-18T17:47:07.841+-200] PUT     127.0.0.1       204 127.0.0.1 /NSlab/recipes/default/tiddlers/%24%3A%2FStoryList          6.302 ms - -
  • Creating a tiddler titled "test":
[2019-04-18T17:47:19.140+-200] PUT     127.0.0.1       204 127.0.0.1 /NSlab/recipes/default/tiddlers/Draft%20of%20'New%20Tiddler' 4.707 ms - -
[2019-04-18T17:47:19.154+-200] PUT     127.0.0.1       204 127.0.0.1 /NSlab/recipes/default/tiddlers/%24%3A%2FStoryList          2.387 ms - -
[2019-04-18T17:47:21.521+-200] PUT     127.0.0.1       204 127.0.0.1 /NSlab/recipes/default/tiddlers/Draft%20of%20'New%20Tiddler' 5.266 ms - -
[2019-04-18T17:47:22.324+-200] DELETE  127.0.0.1       204 127.0.0.1 /NSlab/bags/default/tiddlers/Draft%20of%20'New%20Tiddler'   5.885 ms - -
[2019-04-18T17:47:23.360+-200] PUT     127.0.0.1       204 127.0.0.1 /NSlab/recipes/default/tiddlers/%24%3A%2FStoryList          2.256 ms - -
[2019-04-18T17:47:23.379+-200] PUT     127.0.0.1       204 127.0.0.1 /NSlab/recipes/default/tiddlers/test                        3.544 ms - -

Browser console reports these errors:

$:/core/modules/utils/dom/http.js:71 OPTIONS http://localhost:27768/NSlab/ 404 (Not Found)
$:/core/modules/utils/dom/http.js:71 HEAD http://localhost:27768/NSlab/ 404 (Not Found)

I don't know what else I can check. Regards,

)+(auloop

Need to rename settings-2-1.schema

I installed the newest TS. I upgraded the settings.json file. I upgraded to node.js vsn 10.15.3.

I get the error below. I think it's looking for the wrong settings.schema.json file. After renaming settings-2-1.schema to settings.schema.json I re-ran and the server worked. It might be good to either mention this in the documentation, or perhaps the settings upgrader needs to be tweaked?

The example "branch" which I retained from the original example JSON settings file appears without an icon on the tree home page.

It looks to me like you can now serve files from below the data-folder start directory. I don't believe that was possible before -- great!


C:\Apps\TiddlyServer-2.1.1-beta>node server.js
Settings file: C:\Apps\TiddlyServer-2.1.1-beta\settings.json
(node:11972) [DEP0005] DeprecationWarning: Buffer() is deprecated due to securit
y and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or
Buffer.from() methods instead.
(node:11972) UnhandledPromiseRejectionWarning: Error: Cannot find module 'C:\App
s\TiddlyServer-2.1.1-beta\settings.schema.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.loadSettings (C:\Apps\TiddlyServer-2.1.1-beta\src\server-types.ts:
149:39)
at server.libsReady.then (C:\Apps\TiddlyServer-2.1.1-beta\server.js:18:45)
(node:11972) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). (rejectio
n id: 1)
(node:11972) [DEP0018] DeprecationWarning: Unhandled promise rejections are depr
ecated. In the future, promise rejections that are not handled will terminate th
e Node.js process with a non-zero exit code.

broken image icon

Within the tree definition in my settings.json I have:

    "tree": {
        "projects": {
            "project1": "/path/to/project1",
            "project2": "/path/to/project2",
            ...
        },
    },

For the projects 'subfolder', of type category, the generated HTML is:

<tr class="row even category">
    <td><span class="icon"><img src="/icons/category.png"/></span></td>

category.png is NOT included in the git repo that I get on fetch; so my top level TiddlyServer page ends up with a broken image icon that looks like:
image
and the log ends up with a 404:
1940:[2017-07-05T22:18:49.717-0400] GET 404 127.0.0.1 /icons/category.png

I suspect that icon should be referencing folder.png, not category.png, and that the problem is in https://github.com/Arlen22/TiddlyServer/blob/master/generateDirectoryListing.js#L13-L16

As a separate, too minor to open, issue, you might consider adding a version string or some other identifying information (tag, git hash) in the TiddlyServer generated page so it is apparent what version people have.

TiddlyServer on Synology Linux running Node 4.8

I just found the problem in one of the closed issues: Seems like my NodeJS version is way to old as TiddlyServer requires at least version 6.

Hi Arlen,

TiddlyServer is great and makes working with Tiddlywikis so much easier but I faced a problem installing the Server on my Synology NAS running a custom Linux and only support a pretty old Node.JS version (so I understand if this is completly out of scope). Would be great if you could have a look anyway.

When trying to run TiddlyServer on my NAS the following happens:

admin@REGE-NAS-P1:/volume1/web/TiddlyServer$ npm start

[email protected] start /volume1/web/TiddlyServer
node server.js
/volume1/web/TiddlyServer/src/server.js:202
return server_types_1.obs_stat(state)(favicon).mergeMap(([err, stat]) => {
^SyntaxError: Unexpected token [
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/volume1/web/TiddlyServer/server.js:1:63)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)

npm ERR! Linux 3.10.102
npm ERR! argv "/volume1/@appstore/Node.js_v4/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v4.8.4
npm ERR! npm v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node server.js'.
npm ERR! This is most likely a problem with the tiddlyserver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs tiddlyserver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls tiddlyserver
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /volume1/web/TiddlyServer/npm-debug.log

npm-debug.log

Opening into a wiki instead of the html listing

I am working on making a wiki that can be used to configure tiddlyserver. My hope is that using the default configuration settings from #15, when you start tiddlyserver and open up 127.0.0.1:8080 it will open into a wiki that will guide you through setting up tiddlyserver.

I have almost all of the pieces of this from other projects so it is just a matter of putting the pieces together in a nice way.

My work on this is on my fork here: https://github.com/OokTech/TiddlyServer

safe-buffer missing from 2.0.9

Hello,

When I download the latest release 2.0.9 and try to run it it says safe-buffer isn't installed.

ray@ray-VirtualBox:~/Documents/TiddlyServer$ node server.js 
module.js:538
    throw err;
    ^

Error: Cannot find module '../safe-buffer/safeBuffer.js'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at /home/ray/Documents/TiddlyServer/lib/websocket-server/WS/PerMessageDeflate.js:13:20
    at Object.<anonymous> (/home/ray/Documents/TiddlyServer/lib/websocket-server/WS/PerMessageDeflate.js:500:3)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)

I've tried running npm install safe-buffer but it didn't work.

However, if I go back 2.0.8 it works fine.

TiddlyServer (Source Code version) shows TiddlyWiki version 5.1.14 even though 5.1.15 has been installed instead

Hi,

Maybe this is not a bug, as I have tampered with TiddlyServer to run TiddlyWiki version 5.1.15, and the latest TS version still uses 5.1.14. But just in case TS can be improved to be TW5 version agnostic.
I am using TS Source Code. I downloaded the ZIP, unpacked it in my Windows PC, changed the package.json to make it dependent on TW version 5.1.15 rather than 5.1.14, and run npm install. Then I moved the tiddlywiki directory in node_modules up in parallel to node_modules as described in the instructions in Installation -> Source Code Version
I reused settings.json that I was already using with TS 2.0.6, and launched TS. TS is serving local files and a couple of TW folders. Everything worked fine, and I could check that TiddlyWiki had some of the new 5.1.15 features (e.g. new "Explorer" tab to "More" sidebar), but the TW version in the settings read 5.1.14.
What is the reason for this inconsistency?
It is not a big deal, but I do not understand why TS used in Source Code has to be linked to a particular TW version.
Thank you.

TiddlyServer still gleaning 127.0.0.1 when another IP Address is used

Hi Arlen, Thanks again for the great TiddlyServer.

I have added an additional IP Address to my computer and hosted TiddlyServer on that address, as specified in my full settings.json below. This works well since now I can access tiddlyServer at http://192.168.1.81 (throughout my LAN) without any port number as http defaults to 80. I can also move the IP address to another computer and all my link addresses will not change and I can use dns to map ts.local to this address. All Good, with a minor bug?

The intention however was to free the Computers "primary IP Address" so TiddlyServer was not taking 127.0.0.1:80 however it continues to do so.

Is this a bug or is there a way to configure around this, so TiddlyServer only appears on http://192.168.1.81? and not on local host

Thanks in advance

{
    "tree": {
	    "Home": "C:\\Data\\TW5\\Hosting\\TiddlyServer-2.0.14\\index.html",
		"Instances": "C:\\Data\\TW5\\Instances",
		"IndexWikis": "C:\\Data\\TW5\\indexWikis",
		"PSaT Business": "C:\\Data\\TW5\\PSaT",
		"PSaT Development": "C:\\Data\\TW5\\PSaTDev",
		"Development": "C:\\Data\\TW5\\Development",
		"EmptyWikis": "C:\\Data\\TW5\\EmptyFiles",
		"Clients": "C:\\Users\\antho\\Documents\\Business\\PSaT\\Clients",
        "WebDav": "C:\\Users\\Public\\Documents\\tw",
	    "Node": "C:\\Data\\TW5\\NodeJS",
        "Editions": "C:\\Data\\TW5\\editions",
		"Pictures": "C:\\Users\\antho\\Pictures\\TiddlyWiki\\",
		"!Root": "C:\\Users\\antho\\Documents\\!Root",
		"lib": "C:\\Data\\lib"
    },
    "types":{
        "htmlfile": ["htm", "html", "hta", "png", "tw"]
    },
    "username": "",
    "password": "",
    "host": "192.168.1.81",
    "port": 80,
    "backupDirectory": "C:\\Data\\TW5\\backups", 
    "etagWindow": 10,
    "etag": "",
    "useTW5path" : false
}

Suppressing HTTP logging?

Hi, thanks for all your work on this - it's a great tool! I was wondering, is it possible to suppress all the HTTP logging that TiddlyServer spits out? I'm running it as a systemd user service now and I'd rather that the logs didn't get filled with protocol debugging. I've tried setting debugLevel to a higher number but it doesn't seem to make any difference...

Cheers,

Cannot link to files uploaded added through browser

I don't seem to be able to link to files in tiddlers that I attached through tiddlywiki.

I attach a file to my wiki by dragging it into the browser window. It then creates a new tiddler and the file appears in my tiddler folder. When I create a new tiddler and link to the file [ext[mytiddlywiki/tiddlers/testfile.zip]] the browser can't find the file and I get an error.

My directory is ../ and my tiddlywiki is located in TiddlyServer-master/mytiddlywiki. Relative linking to files located in TiddlyServer-master works without problems, but files located in TiddlyServer-master/mytiddlywiki/tiddlers does not work.

I work with relatively large files that are unsuitable for viewing in tiddlywiki. Ideally I would want to be able to drag them into tiddlywiki and easily link to them. If I understand it correctly that should be possible with tiddlyserver. Am I correct and is the described issue something I can solve?

PS I am hosting Tiddlyserver on my vps, hence the need to do everything through the browser.

Don't support chinese

Hello Arlen !
Thanks for your work, I love TiddlyServer so much!
I have some small question need your help, TiddlyServer seem not to support chinese :( . when My local path contains chinese, It display garbled.
My test system is windows 7 ,TiddlyServer and Tiddlywiki is the latest version.

Looking forward to your reply

[v2.1.0-beta] Upgrade-settings exits with error

Dear Arlen22,

I'm interested in running TW5.1.19 on TiddlyServer, so I downloaded v2.1.0-beta.
I ran this command to convert old settings file:

node upgrade-setting settings_2-0-14.json settings_2-1-0.json

and it returned the following error:

The conversion failed because:

K:\MK\opt64\TiddlyServer-2.1.0-beta\upgrade-settings.js:39
newSettings = NewDefaultSettings(newSettings);
              ^

TypeError: NewDefaultSettings is not a function
    at Object.<anonymous> (K:\MK\opt64\TiddlyServer-2.1.0-beta\upgrade-settings.js:39:15)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

My environment is Win 10 64 bit + Node.js 10.15.3

Thanks in advance for your help.

Problems getting started

Trying to get the basic tiddlyServer to run by following the referenced tutorial

I have been able to run up the TiddlyServer and can navigate through the tree.

I created a blank tiddlywiki directory with

tiddlywiki --init test

When I navigate to that directory using TiddlyServer I get this message

The Tiddlywiki data folder failed to load. The error has been logged to the terminal. To try again, use ?reload=true after making any necessary corrections.

I get this logged to the console;

DAT 2017-11-28 17:41:15 error starting /learning/tiddlyServer/data at d:\learning\tiddlyServer\data: Error: Cannot find module '$:/core/modules/commands/server.js'

Supporting default and local configurations

I used some things from another project to modify tiddlyserver so that you have two configuration files instead of the single settings.json file currently used. The idea is that you have a default configuration file (called Config.json) that works and then a local settings file (Local.json) that can modify the default version.

So for tiddlyserver the default file would have default values for every property, but if someone wants to change the address on their version they edit Local.json to just add the address property, than this overrides the default value in Config.json without them having to edit any of the default values.

This way a person only has to set the options that they want to change from the default and TiddlyServer can have a default configuration that works without any configuration needed.

I am also working on creating a wiki that can be the default location for navigation and that will let you change the settings without having to directly edit a json file. I will make another issue for that.

SyntaxError: Unexpected token [

when I run 'node server' from my TiddlyServer directory I get the following error:

/home/pi/code/TiddlyServer/server.js:151
        return server_types_1.obs_stat(state)(favicon).mergeMap(([err, stat]) => {
                                                                 ^

SyntaxError: Unexpected token [
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:414:25)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:134:18)
    at node.js:961:3

Files being duplicated

Hello

Why files are duplicated when I update data in my tiddlywiki ?

$_StoryList.tid
$_StoryList 1.tid

This is the case for system tiddlers and mine.
This my first in GitHub so sorry if this space isn't made for it.

Best regards

PDF files don't serve to local network devices

On remote devices (e.g. one's using the local network) PDF's don't seem to serve. Tested on Linux and Windows (7). They do serve on the local server itself, just not on the network.

Some clarifications about version and behavior

Hi Arlen,
sorry to bother you again, but now i'm completely confused.
Can you help me understanding if i'm doing something wrong?

  1. commits in github say that the package was updated for 5.1.15, but all plugins.info into tiddlywiki\plugins\tiddlywiki are still marked 5.1.14

  2. if i open a datafolder and download in local the browser content, indeed i see in the file that the <div> are all marked version="5.1.14"

  3. if i throw away the bundled tiddlywiki and substitute it with the content of TiddlyWiki5-5.1.15, now i obtain a file with <div> marked as version="5.1.15"

  4. the tiddlywiki\core content is completely different from TiddlyWiki5-5.1.15 content. Did you pack all the original content into that single pluging.info?

  5. in the github readme you say "Loads data folders using a certain core/boot version (currently whatever gets installed with npm install or the bundled version if you use that)" but as far as i understand this does not correspond to real behavior.

  6. actually as far as i could understand node.js is not booting the original tiddlywiki\boot\boot.js but a heavily modified version of it in src\boot.js. Why and what are the differences in behavior?

  7. i also installed TiddlyWiki5-5.1.15 with npm but i didn't find any way to have TiddlyServer using it. If there is a bundled version it uses it, if i remove the bundle the server crashes.

Thanks, Gabriele

[v2.1.1.-beta] Errors when running

Windows 7.
I copied over my old working settings file as settings-old, and upgraded it. Running the server immediately generated a plethora of errors (below).

Thanks!
Mark


Successfully converted settings. The new file is
C:\Apps\TiddlyServer-2.1.1-beta\settings.json

C:\Apps\TiddlyServer-2.1.1-beta>node server.js
Settings file: C:\Apps\TiddlyServer-2.1.1-beta\settings.json
TypeError: p is not a function
at process.de (C:\Apps\TiddlyServer-2.1.1-beta\lib\bundled-lib.js:161:524800
)
at emitTwo (events.js:106:13)
at process.emit (events.js:191:7)
at process.emit (C:\Apps\TiddlyServer-2.1.1-beta\lib\source-map-support-lib.
js:1771:21)
at emitPendingUnhandledRejections (internal/process/promises.js:56:22)
at runMicrotasksCallback (internal/process/next_tick.js:61:9)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process.tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
caught process uncaughtException
C:\Apps\TiddlyServer-2.1.1-beta\lib\bundled-lib.js:161
!function(e){"use strict";function A(){for(var e=arguments.length,A=Array(e),t=0
;t<e;t++)A[t]=arguments[t];if(A.length>1){A[0]=A[0].slice(0,-1);for(var r=A.leng
th-1,i=1;i<r;++i)A[i]=A[i].slice(1,-1);return A[r]=A[r].slice(1),A.join("")}retu
rn A[0]}function t(e){return"(?:"+e+")"}function r(e){return void 0===e?"undefin
ed":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]"
).shift().toLowerCase()}function i(e){return e.toUpperCase()}function a(e){var r
=A("[0-9]","[A-Fa-f]"),i=t(t("%[EFef]"+r+"%"+r+r+"%"+r+r)+"|"+t("%[89A-Fa-f]"+r+
"%"+r+r)+"|"+t("%"+r+r)),a="[\!\$\&\'\(\)\*\+\,\;\=]",n=A("[\:\/\?
\#\[\]\@]",a),o=e?"[\xA0-\u200D\u2010-\u2029\u202F-\uD7FF\uF900-\uFD
CF\uFDF0-\uFFEF]":"[]",s=e?"[\uE000-\uF8FF]":"[]",c=A("[A-Za-z]","[0-9]","[
-\.\
\~]",o),u=t("[A-Za-z]"+A("[A-Za-z]","[0-9]","[\+\-\.]")+""),g=t(t(i
+"|"+A(c,a,"[\:]"))+"
"),h=(t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0
-9]")+"

TypeError: p is not a function
at process.de (C:\Apps\TiddlyServer-2.1.1-beta\lib\bundled-lib.js:161:524800
)
at emitTwo (events.js:106:13)
at process.emit (events.js:191:7)
at process.emit (C:\Apps\TiddlyServer-2.1.1-beta\lib\source-map-support-lib.
js:1771:21)
at emitPendingUnhandledRejections (internal/process/promises.js:56:22)
at runMicrotasksCallback (internal/process/next_tick.js:61:9)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3

Cannot start the server, because of SyntaxErrors

I tried to install the server on my pc, but it couldn't start because of the following error.

C:\Users\xxx\Downloads\TiddlyServer-2.0.11\src\server.js:3
const rx_1 = require("../lib/rx");
^^^^^
SyntaxError: Use of const in strict mode.
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (C:\Users\xxx\Downloads\TiddlyServer-2.0.11\server.js:1:63)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

If I remove "use strict" from the file, it will show the following error:

C:\Users\xxx\Downloads\TiddlyServer-2.0.11\src\server.js:12
process.on('uncaughtException', err => {
                                    ^^
SyntaxError: Unexpected token =>
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (C:\Users\xxx\Downloads\TiddlyServer-2.0.11\server.js:1:63)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

Node Version: v8.9.4
Windows 10 Pro

Please clarify how static files get served

I am not sure if it is just me but I can not get the static file serve working. When I create a new wiki via node tiddlywiki wiki --init server TiddlyServer shows and handles everything just fine. However when I import my single file wiki (FF 57, you know) all links to my external images are broken.

My single file structure:

- wiki/
    - 20xx/
    - 2016/
    - 2017/
        - img1.jpg
        - img2.jpg
    - index.html

Inside the wiki links look like this [img[2017/img1.jpg]]. When I open a tiddler with images the server requests /wiki/2017/img1.jpg which looks right to me. But somehow this results in a 404 and I have no idea where to put my images.

What I tried (none did work):

- wiki/
    - 20xx/
    - 2016/
    - 2017/
        - img1.jpg
        - img2.jpg
    - tiddlers/
- wiki/
    - tiddlers/
        - 20xx/
        - 2016/
        - 2017/
            - img1.jpg
            - img2.jpg
- wiki/
    - tiddlers/
- 20xx/
- 2016/
- 2017/
    - img1.jpg
    - img2.jpg

I think I am missing a crucial thing here but I don't know where. The only thing that seems to work is importing a image via drag&drop and linking to the new tiddler (which creates the "image" tiddler and a .meta tiddler alongside. However I want my images in one place (sorted by year) and tiddlers in another. Maybe the documentation could clear this up as how to migrate to data folders with external images.

Thank you for your help and this great peace of work :)

Integration into a website

Hi,
I have a website that is developed out using node.js. I would like to add the wiki in a subdirectory, say http://myweb.com/blog, as a read-only sub to the main site.

I am currently editing the TW via the node.js tiddlywiki module run locally. I just want to be able to copy the directory over to the public server and have it available online.

As the public site is already running node is there anyway I can simply detect the "/blog" route using express and send the request to a TW node module to handle the display? I would like it to be under the same domain for simplicity and SEO purposes.

If it can't run on a sub-path I wonder if it could be implemented as a sub-process or a fork sharing the port with the master.

Use of ifaces = os.networkInterfaces

By default TiddlyServer is going to effectively broadcast / make accessible all the TW contents it supports on the local area network. You might want to document the "host" (and "port") settings.json possibilities and warn users. Better yet, I suggest including "host": "127.0.0.1" - the reserved loopback address - in the example settings.json file would be a better default, non-routable option in my opinion; see https://serverfault.com/a/839462 and that, if no value "host" key is present in settings.json default to "127.0.0.1"

One could see using the ifaces = os.networkInterfaces that TiddlyServer discovers as a feature, however. On my home network, for example, the current default handling makes TiddlyServer-served contents accessible to / editable from my other devices, like my phone or tablet as well as the laptop where it is installed. So I would not eliminate this option, just make sure users are aware they may be making their TW contents accessible by anyone on the same network: wives, children, neighbors if they have not locked down their firewall, or potentially fellow coffee shop patrons. Perhaps TiddlyServer could discover the network interfaces - for those that would like that and have been suitably warned about the implications - by checking for a "host": "discover" key/value pair in settings.json. Then TiddlyServer could default to being secure or open as a user choice.

I can attempt a PR if you'd like, though my JavaScript is not strong.

Alternative File Extension for TiddlyWiki Files

Hi Arlen,

I was wondering if you could consider my request here, which would open up additional uses for TiddlyWiki as easy to share smart documents. I would love to have TiddlyServer supporting this as well, and I believe it should be a trivial change. The Standard save supports saving as .tw files, as is Timimi.

Could you please review Alternative File Extension for TiddlyWiki Files #3719 with a view to allowing TiddlyServer to serve single File wikis with the .tw extension just as it does .htm and .html files?

In tiddlyserver I can't open it because we get the following dialogue
tsopen
which then seems to open a tempfile eg file:///C:/Users/USERNAME/AppData/Local/Temp/empty-2.tw rather than the actual file in place as for regular TiddlyWikis.

I can browse to such files as below but not open as a wiki .tw or .hta files

    "types":{
        "htmlfile": ["htm", "html", "hta", "png", "tw"]

Error XMLHttpRequesterror:413 after setting up reverse proxy

First off thanks for your efforts to make this available. Secondly this may not fall into a bug issue because I can get the node.js server to work if I connect directly, but as it turns out when reaching it through my reverse Nginx proxy I get the error above when trying to save a change. I might add my brain is sort of mush after staying up most the night solving my USB encryption issue on my Rock64 single board computer running the whole enchilada. Google indicates a file size issue, but I don't know.

Errors while saving single-file

Edit: This is for 2.1.1-beta

Making a change to a tiddler on a single file doesn't change the "saved" checkmark, though it appears that it is saving. But making a second change, I get

Error while saving:
XMLHttpRequest error code: 0

and
XMLHttpRequest error code: 412

Errors.

Saving a local copy of stand-alone file?

Currently if you are serving up a data tiddler you can click the "save" button and get a local, stand-alone TW. But this feature doesn't seem to work when serving up a stand-alone file. This would be useful, for instance, if you were on a mobile device and wanted a quick copy before leaving your local network. This would be useful even though the "downloaded" file is not in the exact home directory that you would usually use.

Thanks!

Possible typo in info message when running `node server.js` from command line

browser is mispelled as browswer (unless it is intentional that way) in the info message that shows up when node server.js is executed.

$ node server.js
Settings file: ...
Open your browswer and type in one of the following:
127.0.0.1:8080

It is certainly a very minor issue, but just wanted to point out since this shows up every time that command is executed.

Thank you for this amazing piece of software!

Allow passing signing user without password, like plain TiddlyWiki --server command

Tiddlywikii --server command allows passing the default username for signing edits without password, but if a specify user into settings.json I always get basic auth prompt even if password is left empty or is removed from settings.

TiddlyServer should allow to replicate the same behavior as Tiddlywiki --server, enforcing password check only if it is not empty.

Problem errno: EADDRINUSE when binding to 0.0.0.0

Hey there,

Thanks for making this great tool.

I tried to run with a bind on 0.0.0.0 inside of a docker container but I kept getting the following error regardless of what port I put: EADDRINUSE 0.0.0.0.

I'm not sure if I'm doing something silly but what I've had to do to work around this is comment out line 151 in server.js as it seems that you do a double bind there if the settings.host is not 127.0.0.1, I guess you meant to do the opposite?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.