hemerajs / hemera-testsuite

Helper library to write tests for Hemera.
MIT License
2 stars 4 forks source link

Testing with real NATS Server connection #13

Closed vforv closed 6 years ago

vforv commented 6 years ago

Is it possible to connect to nats server even if it is not installed in localhost? If not that would be nice to have...

Ex.

var PORT = 6242
var authUrl = 'nats://REMOTE_IP:' + PORT

const nats = require('nats').connect(authUrl)

If we don't have this it will use more space if we have for each service nats server...

StarpTech commented 6 years ago

This is not possible we rely on a complex messaging system and hemera is just a consumer. You can do simple in-memory test with the hemera-testuite demonstrated here: https://github.com/hemerajs/hemera-testsuite/blob/master/test/nats.spec.js