We have many ways to run a wiki farm locally. This example runs wiki on our local computer using only node.js and the federated wiki software.
wiki --farm --data . --security_legacy
wiki runs the wiki server—on port 3000 by default
--farm says host multiple wikis under different domains
--data . says store the wiki data in our current folder
--security_legacy authorizes unrestricted editing
# Exercises
Once wiki is running locally, we can begin creating local sites with our web browser.
Create a few pages on http://localhost:3000 .
Create a few pages on http://farm.localhost:3000 . *
* N.B. Firefox and Chrome treat *.localhost like domains. As of this writing, Safari does not follow this convention. For Safari, create pages with these domain names: http://localtest.me:3000 and http://farm.localtest.me:3000
.
After you have created a few pages, stop the wiki server and look around the filesystem to see where the server saves things.
On most computers, you can stop the wiki server by typing Ctrl-C in the terminal where it's running.
On linux and MacOS you can list the directories like so:
$ ls -1d */* farm.localhost/pages farm.localhost/status localhost/pages localhost/status
When we created pages above, the server created folders for localhost and farm.localhost. In each of those there are folders for pages and status.
Wiki farms create a folder for each subdomain.
Listing the pages folders reveals how wiki saves our pages on disk.
ls -1 localhost/pages/*
# Required Context
We need...
basic fluency with federated wiki—start.fed.wiki ;
basic skills using command-line programs;
basic network knowledge—domain names & network ports;
node.js installed—download ;
wiki installed:
npm install -g wiki