My project working fine on local host but when i try to deploy on the serv00
<-/wahf>$ npm start
whatsapp-bot@1.0.0 start
node index.js
Initializing WhatsApp bot...
node: events:495
throw er; // Unhandled 'error' event
Error: listen EPERM: operation not permitted 0.0.0.0:3000
at Server.setupListenHandle [as_listen2] (node:net:1800:21)
at listenInCluster (node:net:1865:12)
at Server.listen (node:net:1953:7)
at Function.listen (/usr/home/cph/wahf/node_modules/express/lib/application.js:635:24)at startBot (file:///usr/home/cph/wahf/index.js:9:9)
Emitted 'error' event on Server instance at:
at emitErrorNT (node:net: 1844:8)
at process.processTicksAndRejections (node: internal/process/task_queues:82:21) {
code: 'EPERM,
errno: -1,
syscall: 'Listen',
address: 0.0.0.0',
port: 3000
}
Node.js v18.20.4
Thia is my project link for download https://open.luvd.cc/GCuvKRWf 7 Days Validity
And this is for downloading
yarn install
yarn add baileys
yarn start
- put whatsapp no in auth.js
After complete test this cmd
curl -X POST "http://localhost:3000/send-message" \
-H "Content-Type: application/json" \
-d '{"number": "919869654775", "message": "Test"}'
And also help me to bind the localhost with the domain thankyou😐
🙏if you able to help me please help .
I only want to add api+domain by which i can access them normally .