mimamch / wa-multi-session

Multiple Session Whatsapp Socket Javascript Library
https://www.npmjs.com/package/wa-multi-session
MIT License
120 stars 38 forks source link

can't connect when using nodemon #33

Closed Alwisteins closed 4 months ago

Alwisteins commented 5 months ago

I am trying to apply this library as a WA gateway on my backend server.

I combined the code with my backend server and ran it with 1 command using nodemon.

when I try to run the server and try to make a request on the endpoint to create a session, everything runs normally, the qrcode appears and there are no errors on the server.

but when I try to scan the qrcode, my server always refreshes and causes repeated connections (connecting & connected). so the connection never really connects.

but when I tried to run my server using node command, everything went smoothly and connection to whatsapp was successful

mimamch commented 5 months ago

don't use nodemon, because nodemon will watch and restart server if there is changes on file.

Alwisteins commented 5 months ago

Thanks sir

fpiekarski commented 5 months ago

To

use nodemon, please, create a file nodemon.json in base path of project like this: {
"ignore": ["lib/.js", "README","./wa_credentials",".w"] } nodemon.json