Topic: Contact form connection refused when trying to submit
Damian Gemza staff answered 6 years ago
suxxez commented 6 years ago
Hello, so I just found the problem. I had to start the server in the terminal with "node server.js". Can I somehow implement that into my main program, so that it gets started automatically when I run "ng serve"?
Damian Gemza staff commented 6 years ago
Dear suxxez,
You can define the new script in package.json, like "run", and place there node server.js and ng serve commands.
This script would look like this one: "run": "node server.js && ng serve"
Best Regards,
Damian
suxxez commented 6 years ago
Thank you very much!
Wensllei Sulbaran Matos commented 5 years ago
Hi Damian Gemza, I try to define the script in my package.json but I cannot solve the error.
"scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "run": "node server.js && ng serve", "e2e": "ng e2e" },
What am I doing wrong?
Arkadiusz Idzikowski staff commented 5 years ago
What is the error message?
Wensllei Sulbaran Matos commented 5 years ago
Hi Arkadiusz Idzikowski
Error message: POST http://localhost:3000/send net::ERR_CONNECTION_REFUSED
zone-evergreen.js:2952
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 6.2.3
- Device: PC
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: Yes