Open muke1908 opened 1 year ago
Can you assign me this issue? Would like to contribute to this project.
@muke1908
I am facing this error when I run 'npm run dev'
{
[1] err: MongoAPIError: URI must include hostname, domain name, and tld
[1] at resolveSRVRecord (/home/sharduld/open_source/node_projects/chat-e2ee/node_modules/mongodb/src/connection_string.ts:65:11)
[1] at /home/sharduld/open_source/node_projects/chat-e2ee/node_modules/mongodb/src/mongo_client.ts:457:45
[1] at maybeCallback (/home/sharduld/open_source/node_projects/chat-e2ee/node_modules/mongodb/src/utils.ts:449:19)
[1] at MongoClient.connect (/home/sharduld/open_source/node_projects/chat-e2ee/node_modules/mongodb/src/mongo_client.ts:449:25)
[1] at /home/sharduld/open_source/node_projects/chat-e2ee/backend/db/index.ts:17:18
[1] at Generator.next (
I have already set up the .env according to the .env.sample in the repo. Not sure why the database is not connecting. Can you help me here?
@Shardul1908 probably wrong URI (wrong format)? You should still be able to run the app even if no mongo db.
Ohh okay, let me try that. Why is MongoDB used then?
If mongodb is not configured, it'll use inMem storage. Not ideal but you'll be able to run the app. Mongodb is configured in production
Mock 'socket.io-client' library and write unit test.
https://github.com/muke1908/chat-e2ee/blob/master/service/src/socket/socket.ts