FormData submit NodeJS returns 503 unavailable - node.js

I'm trying to deploy my application to Heroku (as usual) and I keep getting 503 Service Unavailable when trying to upload anything through my router handler (Multer)!
it's not related to any packages since I tried different projects with and without multer and the same return

Hi #Mahmoud Nasr,
Kindly run the nodejs code locally in system and check for any issues.
If it works then the issue is with Heroku server configurations or the
server is not available.
If it not working in local in the first place kindly update the snippet,
let's figure it out.
Regards,
Muhamed

Related

I have a problem with my NODEJS API on planetHoster

I created my very first NODEJS API. Locally, it works well but I just hosted it on planetHoster and it doesn’t work anymore. When I enter my query, I find the error "Cannot GET/Nodev2/idcc/list" then my route was functional locally. Do you have any assumptions? Thank you in advance!
I can share my code if you want see
I tried to change directory/file names

Receiving HTTP error 503 on Azure but works locally

I have an Azure Function of type Queue Trigger hosted on Azure with App Service Plan on B1.
That function makes an HTTP request to a website and downloads the HTML. When I debug the function locally and add messages to the queue everything works fine, but when I deploy it and run it on the Azure environment then it gives a 503 error.
This error is consistent with a specific website, other websites work just fine.
I first thought that the problem was with the library that I used to make the HTTP request, but I tried HttpClient, Refit, RestSharp, and they all have the same result. I also tried to get the HttpClient using the dependency injection as described on Microsoft docs but the error is the same.
After many tries I concluded that the code is not the problem, I connected to Azure Console (Development Tools) and run the curl command with the -I parameter to check the HTTP status, the result was 503, on my computer when I run the curl command, it gives me status 200.
Thank you Almis and Skin. Posting your discussions as answer to help other community members.
Website that you are trying to work with is well aware of Azure IPs and are getting blocked. This is resulting in 503 errors.

Having issues with Heroku deployment

I am trying to upload a MEAN stack app for the first time, so I am not sure I am doing it the best way but here it is.
I have deployed my nodeJS server to one domain and it seems to be working fine - response message
but I am having problems with the client part.
I deployed the angular code to a different domain (not sure if that's how you do it) and I am getting this error:
error link
Here is a link to my github project repository if it could provide some more information - https://github.com/igalM/igal-school
I used the Heroku CLI and Container Registry to upload the code with Dockerfile.
Thank you in advance!
Looks like I just had to add a server.js to my client folder. SOLVED!

Deployed angular project 'GET' request not working

I have an built angular project that I'm trying to run. I have copied the folder that I got from 'ng build' and put it in the folder where I have my back end code (used express). I'm running it on my laptop at port 3000.
While all the post requests in my application work fine, none of the GET requests seem to work.
Here is the exact error I'm getting.
If more information is needed to find out what I'm doing wrong, please ask.
Edit 1:
This is what I'm getting in the network tab. The response says html. But when I was working before deployment all my responses were coming as intended.
After looking into the images that you mentioned here, it look like that is has a http failure duing parsing in header:
Take a look here in order to resolve the same:
https://github.com/angular/angular/issues/18396
Thanks

backboneJS application runs fine in NodeJs but not in any other server?

I was trying to load a json file in Collection of BackboneJS. While trying to run this through nodeJS server, it works fine. But once put in a server environment like XAMPP or even in a remote server it does not work? Any link would be a nice help. ( For reference my code is at github : https://github.com/saumya/backboneJS-basics )
thanks
Hey thanks for the helping hand.
Probably I did not understand the situation, so the question is not correct as I see now.
The modified question is:
I have a frontend Application running on NodeJS server at some port.
I am trying to load JSON from another server running on another server.
The answer of #Floby is the way I solved it. Its the CORS thing on the server which provides the JSON. It took me sometime to understand what is happening.

Resources