Closed calebklc closed 2 years ago
Hi, first of all, there are some documentation inconsistencies that I hope will be fixed soon.
About your code:
Using the json-transport is discouraged. Look here: https://deepstream.io/tutorials/plugins/connection-endpoint/websocket-json/ However If you use it you must initiate the client with the jsonTransportMode option as stated in that page.
Where is your config file located? The thing is that you are mixing the node api with the cli config file so to speak...when starting the server via the node api the best option is to pass the config object directly into the constructor:
const server = new Deepstream({...options});
I wouldn't suggest to pass null, it tries to look for the config file in series of paths that are harder to predict since it depends on where the process is being called from etc..
if you wish to use the yaml config file just start the server using the binary via CLI
Let me know if this helps
It works after adding the jsonTransportMode
option.
The config file is located at conf
directory in project root but you're right, I should use the constructor way to load the config.
Thanks for your help and great explanation.
glad it worked
Hi, I'm new to deepstream.io. I'm trying to start with simple application but I am getting below error.
I'm using
@deepstream/client:
^5.2.6@deepstream/server:
^6.0.1Here is my config:
conf/config.yml
server.js
client.js