Giter Site home page Giter Site logo

iwaslazkis / tiddlyserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arlen22/tiddlyserver

0.0 0.0 0.0 37.02 MB

v2 - A static file server that can also save files and mount TiddlyWiki folders

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

License: MIT License

TypeScript 92.58% CSS 0.69% JavaScript 4.48% Shell 0.24% HTML 2.02%

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

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.