The Bluzelle Heroku Example Chat application is a simple nodejs project that utilizes the Bluzelle database, socket.io and expressjs
$ Heroku login
$ Heroku addons:create bluzelledb:test -a APPLICATION_NAME
With the introduction of Permission keys, you need to include your PEM key in the code. To generate your .pem file, please run the following command:
$ openssl ecparam -name secp256k1 -genkey -noout -out my_private_key.pem
where my_private_key.pem is the name of your Pemkey file. The contents will look something like this:
-----BEGIN EC PRIVATE KEY----- MHQCAQEEIFNmJHEiGpgITlRwao/CDki4OS7BYeI7nyz+CM8NW3xToAcGBSuBBAAK oUQDQgAEndHOcS6bE1P9xjS/U+SM2a1GbQpPuH9sWNWtNYxZr0JcF+sCS2zsD+xl CcbrRXDZtfeDmgD9tHdWhcZKIy8ejQ== -----END EC PRIVATE KEY-----
You will need to include the key (between -----BEGIN EC PRIVATE KEY----- and -----END EC PRIVATE KEY-----) in your Heroku Cofig Variables. The config variable should be called BLUZELLEDB_PEMKEY with the value of your key.
There are a couple of challenges with this application architecture.
Messages are appended to each value entry in the database. Once the value entry hit the buffer limit (300 KB), then it will error out. Solution: utilize different uuids
Even though it's using socket.io, this is not "completely" real-time polling. The sockets initializes via HTTPS then "promotes" to sockets. Keep in mind that some browsers will not support this.
If you need help setting up the application to use our service, ask us at gitter: