So, Node is becoming more and more a requirement for doing modern dev work. I admit I’ve been slow on the uptake on this, but I’m always wanting to learn new things, so I’ve been getting to grips with it recently.

Spoiler alert: it’s really really easy if you’re coming from a bit of a web background and have written a bit of frontend javascript.

So, in part to build up a bit of node code on my github profile, and in part to prove a concept for something I talked about recently when I rewrote the Known event queue processor back end, I wrote a Node version of the event queue processor service.

Usage

Configure your database settings and path to Known in the package.json.

By default, the settings are configured to talk to Known as installed with by the vagrant package.

Then, run the event queue:

node main.js

» Visit the project on Github...

Known allows you to install Known via the command line, this can be handy for scripted installs, using non-MySQL database backends, or when installing over a terminal connection to a remote server.

The Basics

Go in to /warmup/CLI, and you’ll see CLIInstaller.

To install a brand new Known using an interactive install simply run

./CLIInstaller install

The Manifest

A manifest is used to pass configuration options to the CLI installer so that you won’t be prompted for them. This is useful for scripting installs.

First, generate a manifest template:

./CLIInstaller generate-manifest /path/to/manifest

Next, edit that file and fill in the appropriate option.

Now, you are able to pass these options to the installer:

./CLIInstaller install config.ini /path/to/manifest

You’ll also notice I’m specifying the config.ini ini file to write to, you can write this config to other files as necessary, which is handy if you’re using per-domain configuration.

Other options

The CLI installer has a few other options that might be useful:

Checking requirements

If you just want to check that your server has the necessary requirements to run Known, you can execute:

./CLIInstaller.php check-requirements

Generate config from manifest

If you want to generate a config file, but without going through the full install (useful if you want to generate a new domain config in a script), you can use the following command to do so

./CLIInstaller.php makeconfig /path/to/manifest 

This will output the new config to stdOut. You can save it to an ini file as appropriate.

This weekend I attended the first Oxford Indieweb camp, kindly organised by Garrett.

Day 1

Due to an early start, and not enough coffee, I had left my phone at home, and so couldn’t log into anything. Two factor auth on things is great, but I think I’ve just spotted a flaw.

Anyway.

I didn’t go with much of a plan, except to meet some techy folk. So that much I achieved.

I had some thoughts about maybe looking into federalisation – cross user login, friend/follow etc. But I also sensed this was going to likely be more than was achievable in the time I had.

During introductions, I mentioned to folk that I was a contributor to Known and gave the project a bit of a shill, since I figured it might be interesting to folk by way of giving them a head start on a few things. So, spent the day helping one of the attendees write their first plugin for it.

After a day of discussion and coding, we retired to a local pub for some more relaxed conversation.

Day 2

Rain stopped play, which was a shame. Many folk decided to stay home. Nevertheless, had a pleasant morning chat over coffee and bagel with Beverley, hiding from the rain.

After braving the shops, and meeting up with a catch up with other friends, I went home and started sketching out some federation / Vouch ideas I had after some interesting discussions.

Great weekend of techy fun, more again soon, please!