1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-28 12:29:56 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/nodejs/Installing TiddlyWiki on Node.js.tid
nome 37823f64e9 Add build targets to server edition
Define for the server edition the same build targets as for the empty

edition, but using the correct template so that the "offline" version

(target "index") works correctly when accessed via HTTP. With this,

`tiddlywiki --build index` is equivalent to the save button.



While the process of setting up TiddlyWiki on Node.js is well documented

and easy enough, the options for  publishing such a wiki to an offline

version (scriptably, e.g. for push-to-deploy setups) are decidedly

non-obvious. With the added build steps, the user only needs to know

three simple commands:



tiddlywiki --init server

tiddlywiki --server

tiddlywiki --build index



and optionally



tiddlywiki --build static
2016-04-03 20:22:11 +01:00

30 lines
1.6 KiB
Plaintext

created: 20131219100608529
modified: 20150325173825615
tags: [[TiddlyWiki on Node.js]]
title: Installing TiddlyWiki on Node.js
type: text/vnd.tiddlywiki
# Install [[Node.js]] from http://nodejs.org
# Open a command line terminal and type:
#> `npm install -g tiddlywiki`
#> If it fails with an error you may need to re-run the command as an administrator:
#> `sudo npm install -g tiddlywiki` (Mac/Linux)
# Check TiddlyWiki is installed by typing:
#> `tiddlywiki --version`
# In response, you should see TiddlyWiki report its current version (eg "<<version>>"; you may also see other debugging information reported)
# Try it out:
## `tiddlywiki mynewwiki --init server` to create a folder for a new wiki that includes server-related components
## `tiddlywiki mynewwiki --server` to start TiddlyWiki
## Visit http://127.0.0.1:8080/ in your browser
## Try editing and creating tiddlers
# Optionally, make an offline copy:
#* click the {{$:/core/images/save-button}} ''Save changes'' button in the sidebar, ''OR''
#* `tiddlywiki --build index`
The `-g` flag causes TiddlyWiki to be installed globally. Without it, TiddlyWiki will only be available in the directory where you installed it.
If you are using Debian or Debian-based Linux and you are reciving a `node: command not found` error though node.js package is installed, you may need to create a symbolic link between `nodejs` and `node`. Consult your distro's manual and `whereis` to correctly create a link. See github [[issue 1434|http://github.com/Jermolene/TiddlyWiki5/issues/1434]]
Example Debian v8.0: `sudo ln -s /usr/bin/nodejs /usr/bin/node`