Skip to content

Instantly share code, notes, and snippets.

@zipcode
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save zipcode/177b8b5c655a94ab205a to your computer and use it in GitHub Desktop.

Select an option

Save zipcode/177b8b5c655a94ab205a to your computer and use it in GitHub Desktop.

Using the html5 scaffold with the open source sync engine

In this guide, I will walk you through the process of adding the html5 scaffold to the vagrant box that the sync engine ships with. This will allow you to try out the app without using our API endpoints.

WARNING: User authentication does not ship with the open source version. Anybody who can see your endpoint can access the API and any emails you have synced to it.

The fast way

If you're not making changes to the scaffold, why not use the latest and greatest online? Once you've got your API endpoint set up, as per the README head on over to http://inboxapp.github.io/inbox-scaffold-html5/set-app-id.html and use localhost as your app. It'll connect to your local copy of Inbox.

If you want to run the scaffold locally too, read on.

Install node

The html5 scaffold uses npm to manage its packages and installation process.

sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install -y nodejs
sudo npm install -g npm

Download and build the scaffold

cd /vagrant
git clone https://github.com/inboxapp/inbox-scaffold-html5.git
cd /vagrant/inbox-scaffold-html5
git submodule init
git submodule update
npm install

start inbox

You'll need a few terminals open. You may wish to run inbox-start and inbox-api inside tmux or screen.

cd /vagrant
bin/inbox-start
bin/inbox-auth [email protected]
bin/inbox-api

start frontend

cd inbox-scaffold-html5
PORT=5001 node server.js

Configure the scaffold

Now you can connect to http://localhost:5001/. The scaffold will request an API key. Type localhost, and instead of connecting to our endpoints it will connect to your instance of the API on http://localhost:5555. You should now be able to experiment with the scaffold and the inbox backend together!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment