server-reg /

Filename Size Date modified Message
1.0
tests
289 B
2.1 KB
This library implements the Browser Sync portion of the Weave Services. 

Full documentation for this section of the API can be found at: https://wiki.mozilla.org/Labs/Weave/Sync/1.0/API

Full setup instructions can be found at: https://wiki.mozilla.org/Labs/Weave/Sync/1.0/Setup

SETUP SUMMARY:

REQUIRES:
apache, configured with ssl and a valid certificate.
php with json, utf8 and pdo support
mysql
The Weave Registration module

APACHE CONFIG:

Apache configs can vary widely, depending on whether you are doing this inside a VirtualHost and how
your system is configured. The Aliases that need to be set up are as follows:

Alias /1.0 <full path to install directory>/weaveserver-sync/1.0/index.php


MYSQL SETUP:

Create a database in mysql

CREATE TABLE `collections` (
  `userid` int(11) NOT NULL,
  `collectionid` smallint(6) NOT NULL,
  `name` varchar(32) NOT NULL,
  PRIMARY KEY  (`userid`,`collectionid`),
  KEY `nameindex` (`userid`,`name`)
) ENGINE=InnoDB;

CREATE TABLE `wbo` (
  `username` int(11) NOT NULL,
  `collection` smallint(6) NOT NULL default '0',
  `id` varbinary(64) NOT NULL default '',
  `parentid` varbinary(64) default NULL,
  `predecessorid` varbinary(64) default NULL,
  `sortindex` int(11) default NULL,
  `modified` bigint(20) default NULL,
  `payload` longtext,
  `payload_size` int(11) default NULL,
  PRIMARY KEY  (`username`,`collection`,`id`),
  KEY `parentindex` (`username`,`collection`,`parentid`),
  KEY `modified` (`username`,`collection`,`modified`),
  KEY `weightindex` (`username`,`collection`,`sortindex`),
  KEY `predecessorindex` (`username`,`collection`,`predecessorid`),
  KEY `size_index` (`username`,`payload_size`)
) ENGINE=InnoDB;


CONSTANTS:

Copy weaveserver-sync/1.0/default_constants.php.dist to default_constants.php and 
follow the instructions in it to set your constants

TESTING:

Create a user and set it in your constants. Run the tests/test_1.0.php script on the command line
in the tests folder (make sure that folder isn't accessible for apache).

CLIENT VALUES:

Set extensions.weave.clusterURL to https://<your server>/weave-sync/



Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.