Moved couchdb to smileupps

This commit is contained in:
benweet 2015-02-03 19:58:27 +00:00
parent 40ed22a874
commit 83ab45dab7
4 changed files with 21 additions and 12 deletions

View File

@ -5,9 +5,9 @@
> **Note:** > **Note:**
> >
> - In order to work with https://stackedit.io, your database has to be accessible through HTTPS. You can use a free hosting service like [Couchappy](https://www.couchappy.com/) or [configure your own instance to use SSL](http://docs.couchdb.org/en/latest/config/http.html#ssl). > - In order to work with https://stackedit.io, your database has to be accessible through HTTPS. You can use a free hosting service like [Smileupps](https://www.smileupps.com/) or [configure your own instance to use SSL](http://docs.couchdb.org/en/latest/config/http.html#ssl).
> >
> - StackEdit doesn't deal with user access rights, but you can still set permissions for your database and configure StackEdit to connect to it using URL like this: `https://username:password@instance.couchappy.com/documents`. > - StackEdit doesn't deal with user access rights, but you can still set permissions for your database and configure StackEdit to connect to it using URL like this: `https://username:password@instance.smileupps.com/documents`.
> >
> - It's up to you to trigger the database compaction, or to keep the full history of your documents. > - It's up to you to trigger the database compaction, or to keep the full history of your documents.
@ -28,25 +28,25 @@ origins = http://localhost, https://stackedit.io
### Create the database ### Create the database
```bash ```bash
curl -X PUT https://instance.couchappy.com/documents curl -X PUT https://instance.smileupps.com/documents
``` ```
### Insert the design documents ### Insert the design documents
```bash ```bash
curl -O https://raw.githubusercontent.com/benweet/stackedit/master/couchdb/setup.js curl -O https://raw.githubusercontent.com/benweet/stackedit/master/couchdb/setup.js
node setup.js https://instance.couchappy.com/documents node setup.js https://instance.smileupps.com/documents
``` ```
Or directly: Or directly:
```bash ```bash
curl https://raw.githubusercontent.com/benweet/stackedit/master/couchdb/setup.js | node /dev/stdin https://instance.couchappy.com/documents curl https://raw.githubusercontent.com/benweet/stackedit/master/couchdb/setup.js | node /dev/stdin https://instance.smileupps.com/documents
``` ```
### Update StackEdit settings ### Update StackEdit settings
To configure StackEdit to use your CouchDB instance, change the in URL in `Menu` > `Settings` > `Advanced` > `CouchDB URL` to `https://instance.couchappy.com/documents`. To configure StackEdit to use your CouchDB instance, change the in URL in `Menu` > `Settings` > `Advanced` > `CouchDB URL` to `https://instance.smileupps.com/documents`.
> Written with [StackEdit](https://stackedit.io/). > Written with [StackEdit](https://stackedit.io/).

View File

@ -28,7 +28,7 @@ define([], function() {
constants.PICASA_IMPORT_IMG_URL = "/picasaImportImg"; constants.PICASA_IMPORT_IMG_URL = "/picasaImportImg";
constants.SSH_PUBLISH_URL = '/sshPublish'; constants.SSH_PUBLISH_URL = '/sshPublish';
constants.PDF_EXPORT_URL = "/pdfExport"; constants.PDF_EXPORT_URL = "/pdfExport";
constants.COUCHDB_URL = 'https://stackedit.couchappy.com/documents'; constants.COUCHDB_URL = 'https://stackedit.smileupps.com/documents';
// Site dependent // Site dependent
constants.BASE_URL = "http://localhost/"; constants.BASE_URL = "http://localhost/";

View File

@ -40,7 +40,7 @@
</dd> </dd>
</dl> </dl>
<p> <p>
With special thanks to <a target="blank" href="http://www.couchappy.com/">Couchappy</a> for CouchDB hosting. With special thanks to <a target="blank" href="http://www.smileupps.com/">Smileupps</a> for CouchDB hosting.
</p> </p>
<dl> <dl>
<dt>Sponsorship:</dt> <dt>Sponsorship:</dt>

View File

@ -275,6 +275,15 @@ define([
version = "v22"; version = "v22";
} }
if(version == "v22") {
if(_.has(localStorage, 'settings')) {
settings = JSON.parse(localStorage.settings);
settings.couchdbUrl && (settings.couchdbUrl = settings.couchdbUrl.replace('https://stackedit.couchappy.com/documents', 'https://stackedit.smileupps.com/documents'));
localStorage.settings = JSON.stringify(settings);
}
version = "v23";
}
localStorage.version = version; localStorage.version = version;
return localStorage; return localStorage;
}); });