Couchapp for sharing images
Couchapp for sharing images, like Pinterest and Flickr but without the service agreements.
Before we begin, you'll need to install these:
Then get the repo and its dependencies:
git clone git://github.com/garbados/egg_chair.git
cd egg_chair npm install
Egg Chair copies images from a directory on your computer to its
attachments/imgs folder. In order to do that, it'll need to know where to copy images from. In
img_dir accordingly. It defaults to
cp config.json.example config.json grunt
Now your app is live!
config.json contains application settings. Specifically:
db: The remote URL where your Couchapp will get pushed.
img_dir: Where Egg Chair copies your images from.
If you're using Cloudant, head to the permissions dashboard for your app and check "Read" for the row "Everyone else". This lets you share your images with the world.
If you're using CouchDB, open up Futon, go to your app, click "Security", and make sure under "Members" that "Names" is
 but "Roles" is
["reader"]. That makes it publicly readable.
By default, your app will live at some url like
user.cloudant.com/egg_chair/_design/egg_chair/index.html, but that's not very pretty. To get pretty urls, like eggchair.maxthayer.org, go to your Cloudant dashboard, and create a Virtual Host pointing from some URL you control, to the
_rewrite_ url of your app, like this:
Use your DNS provider (ex: namecheap) to configure your subdomain settings. Here's what mine looks like: (note: only the part about sub-domains matters):
Egg Chair comes with a
rewrites.json file that takes care of all the URL rewrites. If you want to change the URL structure, change that file.