Install Wiki

We will install a federated wiki server and its associated client-side application on a personal laptop. We will examine where it saves files and try various ways of editing them.

# Install

Install wiki to run wiki with the npm command.

npm install -g wiki

This can take a while and may complain if it can't compile every optional component.

The -g option says to install globally for your laptop. You may need to be an administrator or superuser to install globally. You will want this.

You can install and build from the GitHub source. This is when you will want a local install into a development directory followed by git clones of the modules you will be developing. See Dork About Plugins

# Check

You can test if the install worked by typing the wiki version command.

wiki -v

This will report the semantic version number for wiki and all of its components. When I type this today it reports a long list that begins with the wiki command and its two most important bundles.

wiki: 0.6.3 wiki-server: 0.5.4 wiki-client: 0.4.8

We've converted our efforts to node because it has been a simpler install. I wish it were always simple. When you are successful, please help others who are using similar laptops duplicate your success.

# Launch

Launch your wiki server with the wiki command.

wiki

The server reports various settings before it launches and then even more once it is running. Expect to see.

Smallest Federated Wiki server listening on 3000

Open another browser tab and visit your server and see the one page it has made for you, Welcome Visitors.

localhost:3000

If you see the message "listen EADDRINUSE" then some other service is using port 3000. You can stop that service and try again or try again with a different port for your wiki.

wiki -p 4000 Smallest Federated Wiki server listening on 4000

# Browse

Try browsing the How To Wiki pages.

Use your browser's back button to go back after clicking.

Use the left and right arrow keys to scroll the lineup of pages should it be wider than your screen.

Click links on earlier pages to start browsing from there.

# Edit

Try editing your Welcome Visitors page. Drag paragraphs up and down. Double click to edit. Type cmd/alt-s to save or just click somewhere else.

Try using a terminal window to look for the pages that wiki has saved for you. They will be in your home directory in a subdirectory named ".wiki".

cd ~/.wiki

Find the pages you've created in the pages subdirectory. Find the flag it made for you in the status subdirectory.

If you delete the pages/welcome-visitors file it will create a new Welcome Visitors page on your next visit. Try it.

If you delete the status/favicon.png file it will create a new flag for your site on your next visit. Try it.

You can try editing pages/welcome-visitors with a text editor. This is in JSON format and must be just so. If you mess it up just delete the file and start over. You should be thinking, I could write programs to make pages for me.

Delete your messed up pages/welcome-visitors before going on to the next pomodoro. Write Your Name