updated travis links in README (due to case changes in organization and repository...
[remotestorage.js] / README.md
1 # remoteStorage.js
2
3 [![Build Status](https://secure.travis-ci.org/remotestorage/remotestorage.js.png)](http://travis-ci.org/remotestorage/remotestorage.js)
4
5 ### Where to get help?
6
7 * Consult this README
8 * Read the Guides:
9   * [Adding remoteStorage to your app](http://remotestoragejs.com/doc/code/files2/howto-include-txt.html)
10   * [Howto contribute](http://remotestoragejs.com/doc/code/files2/howto-contribute-txt.html)
11   * [Working with schemas](http://remotestoragejs.com/doc/code/files2/howto-include-txt.html)
12   * [How to configure synchronization](http://remotestoragejs.com/doc/code/files/lib/sync-js.html#How_to_configure_sync)
13 * Consult the [API documentation](http://remotestoragejs.com/doc/code)
14 * Ask in the [IRC Channel](http://webchat.freenode.net/?channels=remotestorage) (#remotestorage on freenode)
15 * Open an issue for discussion, either in the relevant repository or [the website repo for general discussion](https://github.com/remotestorage/remotestorage.io/issues)
16
17 ### Adding remoteStorage.js v0.7 to your app:
18
19 #### add "remoteStorage-modules.min.js" (you can download it from http://remotestoragejs.com/release/0.7.0/remoteStorage-modules.min.js)
20 #### in index.html, include this script and any modules you plan to load:
21
22     <script src="remoteStorage-modules.js"></script>
23
24 #### at the beginning of the document body, add a div:
25
26     <div id="remotestorage-connect"></div>
27
28 #### claim access to for instance the 'notes' module, and display the widget:
29
30     remoteStorage.claimAccess({notes: 'rw'}).then(function() {
31       remoteStorage.displayWidget('remotestorage-connect');
32       ...
33     });
34
35 #### if your app can only be used while connected, then add this on the '...':
36
37       remoteStorage.onWidget('ready', function() {
38         showApp();
39       });
40       remoteStorage.onWidget('disconnect', function() {
41         hideApp();
42       });
43
44 #### in any case, update the DOM when changes come in. This is module-specific:
45
46       remoteStorage.notes.onChange(function() {
47         redrawApp();
48       });
49
50 #### see [example/minimal-0.7.0/index.html](https://github.com/remotestorage/remotestorage.js/blob/master/example/minimal-0.7.0/index.html) for the full example code.
51
52 ### Running the local Test Server
53
54 To test remoteStorage enabled apps, you need to have a remoteStorage compatible storage account.
55 To find out how to get one, see [Get Storage on remotestorage.io](http://remotestorage.io/get/).
56
57 Additionally, remoteStorage.js brings a tiny example server for nodeJS.
58
59 #### To run the test server, first of all add a line
60
61     127.0.0.1 local.dev
62
63 #### to your /etc/hosts file. then run:
64
65     sudo node server/nodejs-example.js
66