Sunday, May 10, 2015 at 8:16 AM

New way to configure nodeStorage

New in nodeStorage v0.73.

I had to switch from Heroku to an AWS-hosted Ubuntu server that's hosting a bunch of other apps. Without the isolation that Heroku provides, the environment variables of all these apps were getting in each others' way. Rather than hack my way through all the arcane rules of environment variables, I decided to create a simpler more reliable (imho) way to configure River4 and nodeStorage, using a config.json file in the same directory as river4.js.

What's in config.json

  1. enabled

  2. myDomain

  3. s3Path

  4. s3PrivatePath

  5. twitterConsumerKey

  6. twitterConsumerSecret

  7. myPort

  8. urlUserWhitelist

  9. longPollTimeoutSecs

  10. bitlyApiKey

  11. bitlyApiUsername

Three exceptions

If you're using S3 storage, you need to provide the three values for your AWS account. Since the Amazon library is looking for these in environment variables, you must provide them that way.

  1. AWS_ACCESS_KEY_ID

  2. AWS_SECRET_ACCESS_KEY

  3. AWS_REGION

Example

Here's an example, the contents of config.json on my server (with values changed).

A picture named nodeStorageConfig.png

Update

nodeStorage v0.77 adds two new elements to config.json.


Last built: Wed, Jul 29, 2015 at 8:29 AM

By Dave Winer, Sunday, May 10, 2015 at 8:16 AM. Ask not what the Internet can do for you...