error handling for connecting to remote db
fixed update post
use remote in production