egg-chair

0.1.1 • Public • Published

Egg Chair

Couchapp for sharing images, like Pinterest and Flickr but without the service agreements.

Egg Chair

Install

Before we begin, you'll need to install these:

  • node.js: download and install manually.
  • grunt: npm install -g grunt-cli

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 config.json set img_dir accordingly. It defaults to ~/Pictures.

cp config.json.example config.json grunt

Now your app is live!

Configuration

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.

Permissions

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.

Enabling Pretty URLs with Cloudant

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:

Rewrite screencap

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):

Sub-domain screencap

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.

Readme

Keywords

none

Package Sidebar

Install

npm i egg-chair

Weekly Downloads

3

Version

0.1.1

License

BSD

Last publish

Collaborators

  • garbados