Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Getting Started

Skyler Brungardt edited this page Jul 23, 2014 · 12 revisions

Once you have node, npm, bower, and probably git installed, you're ready to get nooline itself up and running.

Step 1: Get the nooline code

You can do this in a variety of ways, but probably the easiest is to download the latest version from the releases page, and extract it to wherever you want nooline to live on your server.

Alternately, you can clone the repo: git clone http://github.com/nooline/nooline

The package is even available on npm: npm install nooline

Step 2: Install nooline's dependencies

Once you have nooline downloaded (and perhaps extracted), you'll need to install the packages nooline uses to run. To do this, you'll need to cd [wherever you downloaded or extracted nooline] and run npm install && bower install.

At a very basic level, this is enough for nooline to run (you can test this by running node nooline.js from within nooline's directory, and watching workers spin up for each of your cores), but we're not done yet. We still need to add content.

Step 3: Adding an initial content repository

Nooline treats each site, and all of the site-specific material, as its own repository by default. It relies upon git to manage versioning, and easily integrates with github (but any git repo will work). Each site nooline serves exists within the sites/ folder inside the nooline root folder, and should match the domain name it's expected to serve. For instance, in order to serve the site "nooline.org", there needs to be a folder called "nooline.org" inside the sites/ folder. If we were also serving a site called "foobar.baz", the folder hierarchy would look like this:

[nooline root folder]
|__sites
   |__nooline.org
   |__foobar.baz

Each site folder contains the configuration files for that site, the content for that site, the user data for that site, and the templates that site uses. A minimal example of what's required can be found in the default nooline template. These folders can be added however you like: git submodules if you've gotten nooline through git, manual downloads of releases, or whatever way fits you best. Feel free to fork the nooline.default repo, and modify away.

However you choose to add such a folder, you'll need to make sure it's a git repository* with a remote set. The easiest way to do this is to fork the nooline.default repo, rename it to whatever site you want, and then clone it down to your sites folder. By default, nooline comes with an empty nooline.default folder in the sites repo. You can remove this, ignore it, rename it, or whatever you'd like.

If you got nooline via git, you'll likely need to use submodules. From the nooline root directory, that would look something like this:

cd [wherever nooline is]
git submodule add [url of your repo] sites/[domain name or name of your repo]

Whereas if you downloaded nooline as an archived release, you'd be doing a straight clone from the nooline root folder:

cd [wherever nooline is]
git clone [url of your repo] sites/[domain name or name of your repo]

Finally, if you downloaded a site template via an archived release, you'll need to initialize it as a git repo manually:

cd [wherever nooline is]/sites/[your site folder]
git init
git remote add origin [your remote git repo]

Nooline redirects all requests for a site prefixed with www. to the equivalent without the prefix. Thus, www.yoursite.com will redirect to yoursite.com. This means your site folder shouldn't have www. as a prefix. Other subdomains should work fine. Naturally, you'll need to point your domain name at your server's IP address.

If the site config mode is set to "debug", nooline won't push any of the changes to the git repo. This can be changed in the site.json config file, located in the config/ folder of the site.

*If you've overridden nooline's versioning or storage system with something other than git, you'll still at least need to have most of these folders present in the site's folder.

Fire it up!

You're done! Running node nooline.js from within the nooline folder will fire up the nooline process, and spawn as many workers as your server has cores. You can pass additional flags to nooline to configure how it runs, detailed here.

Now go write some content!