Reputation: 5657
I've created a simple react app via create-react-app
and I'm trying to access my Redis DB using the node redis client.
When I start up my app, I receive the following error:
Module not found: Can't resolve 'hiredis' in '/Users/Joseph/workspace/chatbots/diagnosis-bot/symptom-search/node_modules/redis/node_modules/redis-parser/lib'
I have a feeling it is because redis is actually made for node and not react, but still want to know whether there is any workaround this without having to make a separate back-end node app just to access Redis.
Upvotes: 0
Views: 1852
Reputation: 651
I do not know of any way you could connect to Redis without an intermediary using React.
There are security issues with trying to connect directly to Redis from a front-end application: you would have to expose users to your connection details.
Upvotes: 2