Skip to content
This repository was archived by the owner on Oct 21, 2023. It is now read-only.

meth/server

Repository files navigation

Build Status

Meth sync server

This uses express-pouchdb to expose a sync endpoint for PouchDB.

Branches

  • dev - Default branch, where latest development takes place, deployed to https://sync-dev.meth.app
  • master - Production branch, deployed automatically via Travis CI, deployed to https://sync.meth.app

Running

Note: Developed and tested with Node 8.10.0

Two running modes:

  • development: (default) the process uses an in-memory PouchDB.
  • production: uses the externally hosted production CouchDB instance.

By default it runs in development mode:

$ yarn dev

To get HTTP request logging into /tmp/meth-express-pouchdb.log:

$ DEBUG=1 yarn dev

Deployments

Remember to switch to the Meth team using now switch.

### Development

Deploy to https://zeit.co/now and note the deployed endpoint:

$ yarn deploy:dev

Enter the deployed endpoint URL into your meth-browser app config (see the browser repo README for instructions).

Production

The production deployment needs to connect to our hosted production CouchDB instance. The following secret variables thus need to be setup:

$ yarn now secret add couchdb_url <...URL...>
$ yarn now secret add couchdb_username <...username...>
$ yarn now secret add couchdb_password <...username...>

Once this is done, do:

$ yarn deploy:prod

Now alias to our domain name:

$ yarn now alias <...url to deployment...> meth.app

Once done the deployed backend should be accessible at https://meth.app

Releases

No releases published

Packages

No packages published