PouchDB server is a nodejs implementation of CouchDB. Below is the steps to use AmazonRDS and NowJS to deploy your own PouchDB Server. Using MySQL as a persistent backend.
Create a Amazon Web Services Account
Use aws console to create an Amazon RDS MySQL Instance
https://console.aws.amazon.com/rds/home?region=us-east-1#
Follow the step by step directions make sure you capture the following information
endpoint: ... username: root password: ...
npm i now -g
mkdir [servername]
cd [servername]
npm i json -g
yarn init -y
yarn add pouchdb-server @twilson63/mysql-down
json -I -f package.json -e 'this.scripts = {"start": "pouchdb-server --level-backend=@twilson63/mysql-down"}'
create a new file called .env
MYSQL_URI=mysql://[username]:[password]@[endpoint]:3306/[dbname]
MYSQL_SSL=Amazon RDS
create a new file called config.json
{
"couchdb": {
"uuid": "unique-string"
},
"log": {
"file": "/tmp/logs.txt"
}
}
URL=$(now -E)
now alias ${URL} [servername].[domain]
What does your now.json look like?