Help

This is part of the Help pages of a graphical or backend tool offered in the Snap environment. All the tools can be found in the Help page (top-right corner).

As you use Cassandra, once in a while some of the tables they handle will get corrupted. In most cases, I think that happens when I restart my computer without first killing Cassandra. One problem with Cassandra is that it may take seconds between the kill command and Cassandra actually exiting. If you shutdown your computer, the kill sent to command waits something like 1 second before sending a -9 (i.e. actual KILL signal instead of just TERM.)

The result is that it may leave some files (tables) in an unknown state. These files can be deleted though, but you have to be careful. Make sure ...

Introduction

In order to keep our code as easy as possible to maintain and enhance, we request that all code submitted for the Snap! Server be written in a very specifc way as described below. Being very consistent very much ease reading each others code. The most important aspect is indentation. Definitively make sure your indentation is correct! Although we encourage you to submit patches and plugins of your own making, we require that this coding standard be followed before you submit anything or it is likely that it will be rejected (we do not have the time to do the formatting for you ...

When a domain rule set matches, Snap generates a canonicalized domain name which it uses to access a website rule set. (The snap-manager tool will soon offer a way to test your domain names to see what the canonicalized version really looks like, but it should as you expect... everything except the flags.)

Once the name of a website rule set was determined, it can be added using the Websites tab of the snap-manager tool. As you can see, like with the domains, you have a New button at the bottom of the tab. Click on it to create a new website entry.

The rules are very similar to those found ...

Quick Samples

Domain names only include the domain and the top level domain extension (TLD).

example.com

The sub-domain names include a period, you must make sure to include the period!

required host = "www\.";

You can define a sub-domain replacement using the website() function:

required host = website("(w{1,4}\.|)", "www");

This means use "www" if you find nothing, "w", "ww", "www", or "wwww".

A sub-domain that is an option is marked as a flag:

required language = flag("(en|fr)\.", ...

Snap! Manager

The Snap! Manager helps you manage your Cassandra database. It is useful to get started as you need to include at least one website to open something with your browser.

The process to get started:

  1. Install and start your Cassandra cluster
  2. Run the snapserver at least once so the cluster gets initialized (basic tables get created)
  3. Start the snap-manager tool
  4. Click on the Cassandra Connect button (bottom left)
  5. Assuming it connected, the Domains tab should be clickable, click on it
  6. Use the New button to create a new domain (see additional help below)
  7. ...
Syndicate content Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly