DEV Community

Christoffer Lybekk
Christoffer Lybekk

Posted on • Edited on

2 1

Running PouchDB Server on Android

PouchDB Server is a drop-in replacement for CouchDB, using PouchDB and Node.js. Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required.
With the ability to run a linux terminal on Android, we can get a running instance of PouchDB Server on it.

Goal

Having a PouchDB Server running on your Android phone.

What you will need

An Android phone with Termux installed

Instructions

At the command line in Termux, run the commands below in the following order:

pkg install python
pkg install nodejs
npm -g install node-gyp
npm install -g pouchdb-server
Enter fullscreen mode Exit fullscreen mode

A ton of warnings and errors may pop up. These can be ignored as long as we get it up and running successfully.

Finally, run:

pouchdb-server --sqlite
Enter fullscreen mode Exit fullscreen mode

If it didn't work, install SQLite:

pkg install sqlite
Enter fullscreen mode Exit fullscreen mode

If all goes well, the PouchDB Server admin interface should be available at http://localhost:5984/_utils, in any browser on your phone:

Some finishing notes

  • At first, PouchDB Server will only be available locally. To enable access from other devices connected to the same network access point, change configuration setting httpd bind_address to 0.0.0.0

  • It starts in admin party-mode (no authentication = open to any one editing.). Be sure to create an admin user if the server is made available on the network to prevent unintended access.

Source article

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay