How i upload angular project with json server on firebase - javascript

i upload angular 4 project to apatche server after build but it not working it get error it cant reach to js files
and try to upload it on firebase hosting but it can't access http request on http://localhost:3000/product/

Related

Can I run my Node.js/Express backend and React.js frontend together in the same file structure?

I am making a web app that uses a Node.js/Express backend and a React.js Frontend. Right now I have my Node.js code that validities login/registration credentials in a separate folder running on localhost:5000 while my React.js frontend login/registration form code is running on localhost:3000.
My question is would it be easier to put both my frontend and backend code into one file structure so I don't have to send the data from my form to my backend running on another domain so for example both my Node.js and React.js code would be running on localhost:3000 and would just send the form information to the Node.js files that validate the user credentials instead of having to use a fetch method to send my form data to the backend. Is this even possible?
Yes, it is possible, you can use Express to serve your static files (frontend ReactJS) and also your backend routes. Take the following Github repository as an example.
https://github.com/Bikranshu/express-react-boilerplate
That is possible, A monolithic architecture with express and reactjs (https://medium.com/#sesitamakloe/easy-express-react-monolith-chapter-1-a1567c6ff483)

Trying to make a post request from nodejs to php server

I just uploaded my nodejs app on Heroku which makes a post request on my localhost 127.0.0.1 my localhost server is on PHP which takes a file and some data and generates an invoice but the problem is I get this error in the Heroku log when my deployed node server tries to make a post request to my PHP server using Axios.
enter image description here
You can see there is a message This is an error ignore that because I concatenated that with the error.
I would appreciate any help thanks.:)

How can i send a file from multer to my website folder which is hosted on a server while multer is localhost

I want to upload a file through multer which is locally, Now i want to set the destination a multer to the upload folder of a website which is hosted on the server like GoDaddy or aws etc
Don't mismatch your concept, localhost mean the ip of your system, so at server end it's a server ip which sense your api calls and handle that request. So multer is use to take your file and download it or copy file on your server, and the file is send from client side.
inshort client send it's file and server get that file process. the library which you are using is multer to handle file.

My website on heroku which uses multer to upload form files on server is automatically deleting my files after some time

I use multer and save my pdf files to the upload folder on the heroku server but these files are deleted after some time so i want to save these files permanently to some other space. Can you help me by telling some free cloud service and how can i interact to the service with my node/express code.

Firebase Cloud Messaging receive notifications on ruby on rails app

I am having an issue with fcm frontend(JS) part of application. I have implemented the JS code of getting a token from server but unable to receive a notification on my client.
I have my rails project setup and it is running using RPUSH. Rpush script is started as well. I am using CURL to send a push notification. I get success message as CURL response but it is not being received on my end. I have tried serviceworker-rails gem as well.
Service worker is started and I am able to receive token via JS request to fcm.

Categories

Resources