From 83ab45dab7662d90c0ba69557c076f7563fa6d20 Mon Sep 17 00:00:00 2001 From: benweet Date: Tue, 3 Feb 2015 19:58:27 +0000 Subject: [PATCH] Moved couchdb to smileupps --- doc/couchdb-setup.md | 12 ++++++------ public/res/constants.js | 2 +- public/res/html/dialogAbout.html | 2 +- public/res/storage.js | 17 +++++++++++++---- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/doc/couchdb-setup.md b/doc/couchdb-setup.md index faeeaa00..6c342b4b 100644 --- a/doc/couchdb-setup.md +++ b/doc/couchdb-setup.md @@ -5,9 +5,9 @@ > **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. @@ -28,25 +28,25 @@ origins = http://localhost, https://stackedit.io ### Create the database ```bash -curl -X PUT https://instance.couchappy.com/documents +curl -X PUT https://instance.smileupps.com/documents ``` ### Insert the design documents ```bash 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: ```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 -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/). \ No newline at end of file diff --git a/public/res/constants.js b/public/res/constants.js index b6350e94..2fb7d9be 100644 --- a/public/res/constants.js +++ b/public/res/constants.js @@ -28,7 +28,7 @@ define([], function() { constants.PICASA_IMPORT_IMG_URL = "/picasaImportImg"; constants.SSH_PUBLISH_URL = '/sshPublish'; constants.PDF_EXPORT_URL = "/pdfExport"; - constants.COUCHDB_URL = 'https://stackedit.couchappy.com/documents'; + constants.COUCHDB_URL = 'https://stackedit.smileupps.com/documents'; // Site dependent constants.BASE_URL = "http://localhost/"; diff --git a/public/res/html/dialogAbout.html b/public/res/html/dialogAbout.html index b23c26be..952183f4 100644 --- a/public/res/html/dialogAbout.html +++ b/public/res/html/dialogAbout.html @@ -40,7 +40,7 @@

- With special thanks to Couchappy for CouchDB hosting. + With special thanks to Smileupps for CouchDB hosting.

Sponsorship:
diff --git a/public/res/storage.js b/public/res/storage.js index a1814bb8..3c1c48fb 100644 --- a/public/res/storage.js +++ b/public/res/storage.js @@ -265,14 +265,23 @@ define([ version = "v21"; } - if(version == "v21") { + if(version == "v21") { + if(_.has(localStorage, 'settings')) { + settings = JSON.parse(localStorage.settings); + settings.template && (settings.template = settings.template.replace('https://stackedit.io/libs/MathJax/', 'https://cdn.mathjax.org/mathjax/latest/')); + settings.pdfTemplate && (settings.pdfTemplate = settings.pdfTemplate.replace('/libs/MathJax/', '/res/bower-libs/MathJax/')); + localStorage.settings = JSON.stringify(settings); + } + version = "v22"; + } + + if(version == "v22") { if(_.has(localStorage, 'settings')) { settings = JSON.parse(localStorage.settings); - settings.template && (settings.template = settings.template.replace('https://stackedit.io/libs/MathJax/', 'https://cdn.mathjax.org/mathjax/latest/')); - settings.pdfTemplate && (settings.pdfTemplate = settings.pdfTemplate.replace('/libs/MathJax/', '/res/bower-libs/MathJax/')); + settings.couchdbUrl && (settings.couchdbUrl = settings.couchdbUrl.replace('https://stackedit.couchappy.com/documents', 'https://stackedit.smileupps.com/documents')); localStorage.settings = JSON.stringify(settings); } - version = "v22"; + version = "v23"; } localStorage.version = version;