Ansyble project remixed, need help!

I remixed the Ansyble project. I hoped to set up a tutorial to make it your own, but now I encounter errors.
The original post can be found here: An encrypted, "evanescent," portable chat app (PWA-enabled)
I manage to get it… “Working”, but now its throwing this error.
(node:3426) UnhandledPromiseRejectionWarning: MongoParseError: Invalid connection string
I have figured out that this error relates to the MongoDB URL, by changing some .env entries.
Does anyone know a way to solve this? How WOULD I set up a database?

The CLI didnt work. I got this error: 2021-01-15T12:48:14.920+0000 warning: Failed to connect to, reason: errno:111 Connection refused
I think the ban on pinging caused this, because it pings the project IP to do so.

It looks like your project is trying to connect to a port 27017 on your machine, which is a closed port. Glitch doesn’t support MongoDB instances, could you use something like MongoDB atlas?

ALright, im trying it now. Ill tell you how it goes.

Aaaaaaand a new error! D: (node:351) UnhandledPromiseRejectionWarning: MongoError: no mongos proxy available

Hi, I made this project a while ago so I may be a bit rusty, but I did indeed use a (free tier) MongoDB Atlas instance. Then, be sure to change the environment variables MONGODB_URL and DB_NAME, filling them in with the access URL provided during your MongoDB setup, and a database name of your choice (MongoDB auto-generates a database with the name you choose, if it doesn’t exist).

I realize the environment variables also include keys for push notifications; just to get things started, I think it should work to just leave these blank.

1 Like

Never thought the creator would post here! I got it working again.
The entire thing died without the variables you mentioned (DB_NAME, MONGODB_URL, and the other keys) so I just entered them in.
Im working on making a remix tutorial right now!

1 Like

Manifest-url is what I was confused about, the entire project crashed when I didnt add it. WHat is that?
For now, its just the mongo url.

Hm interesting, I don’t know if this has changed since you posted, but I think MANIFEST_URL in the env variables list was just an artifact; I ended up never using it and it could be deleted/left blank.

I saw in your tutorial that you got the right idea - there are some 2-3 places in the code where I hard coded some URLs. These should be updated/generalized.

If you want to help, ill happily invite you to the project!
I want to make a chat project that anyone can remix, and use.
Also its been a while since you last replied! Must be really busy!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.