remotestorage / starter-kit

The quickest way to get started with a local remoteStorage server and a Hello World app as your starting point
92 stars 9 forks source link

remoteStorage Starter Kit

This starter-kit is the quickest way to get started with remoteStorage app development. It gives you a local remoteStorage server and a Hello World app as your starting point.

In order to run it, you need node.js installed.

First, save this starter-kit into a folder on your computer, by downloading and unpacking https://github.com/remotestorage/starter-kit/archive/master.zip or by cloning this repository using git.

Then, open a command-line terminal, and type:

cd starter-kit
npm install

to install the dependencies (where starter-kit is the folder you unpacked from the download or with git).

This starter-kit contains three things, baked into one:

To launch all three, you only need to type one command:

node starter-kit

Next steps

Web authoring

The starter-kit also supports cloning apps from elsewhere, as long as those apps are hosted with CORS, and have an assets array in their manifest. At the bottom of the portal page, you will see a big blue "INSTALL NEW UNHOSTED WEB APPS" button. Currently, only the 'my favorite drinks' app is available there for cloning, as a demo, but you could add your own app in two ways:

Just make sure the manifest contains an 'assets' array, otherwise it will not be clonable. Since you have full control over your remoteStorage data, you can also edit apps after you cloned them. To see this in action, type:

remoteStorage.www.storeFile('8003', 'text/html', 'index.html',
    '<html><h2>editing my app!</h2></html>');

in the console while on the portal page, and then visit http://localhost:8003/ to see the result. Web authoring is a new optional feature of the remoteStorage spec, which we have been talking about for several years now (also in the context of Read-Write Web, and whose development was funded by NLNet. The new spec describing it (version 04) will come out in December 2014, and it has been added as an optional feature, meaning not all server implementations and storage providers may support it. Whether or not the currently connected account supports web authoring can be detected through remoteStorage.remote.properties, which is supported by remotestorage.js 0.11 and up.