this is a very simple question to which I am not able to find a simple answer: how can I implement log4js to run in a react app?
I have tried to install the npm package https://www.npmjs.com/package/log4js
But this one seems to be made to run in a node application, and not a react application. the documentation is very scarce about how to use log4js in a react app. I can't find anything to help me.
log4j is a backend service,it's used to log events that happen on the backend, you can use it with a backend framework that would be the api and database of your application.
react is a frontend framework, you can use a client side logger library such as
https://github.com/pimterry/loglevel to log your errors in development.
if you want to keep getting logs in production (after you deploy your website)
use this plugin to send logs to your server
https://github.com/kutuluk/loglevel-plugin-remote
Related
I’m trying to find a way to deploy my app that uses Django on the backend and React front end, and also uses the Spotify API.
The project is based on this tutorial by Tech With Tim
I’ve seen some tutorials that suggest splitting it up and deploying them as two apps, where the backend proxies API requests to the backend as necessary, however since my React app is served with Django, I don’t think this method is conducive to how my app is set up. I've tried to deploy with Heroku but I haven't been successful. I'm not sure if its relevant, but I used webpack.
Here's my folder structure:
Any help? I’d be much obliged.
I'm trying to create an app with a react frontend and make calls to a web api in Visual Studio 2019. I had originally created the API in it's own project and the react front end in it's own project but when I try to test it locally I get an error that it can't find the web address of the API. The examples I see on here as well as on other sites have the controllers and logic in the same project. My question is which is the correct way to design this?
No they don't have to be in the same project. if the API project is running on you rlocal machine then you can send request to http://localhost:PORT/api-path
I am looking for a solution to deploy me ReactJS application bundle with Yii(PHP) code base, I am already having an Yii application which is having frontend and backend both, but some of the page I have migrated into ReactJS application, I want to run both application on same environment,
I need help to configure the application and manage the routing also in the same fashion like old application will reload the page and ReactJS based code will run as client side.
Server: AWS
Technology: ReactJS + Yii (PHP)
Any suggestion !!!
I am trying to deploy a React app that uses a flask backend.
I've never done this, so I would like to clarify some stuff.
Do we first have to deploy the flask backend somewhere and make the React frontend call that API instead of localhost?
If so, do we have to separately deploy the frontend after doing this?
What is the brief flow of this process?
Thanks
I think this goes towards preferences and common practices, but if it was up to me I would deploy the backend first and make sure the fronted works before I deploy that too. It is not very uncommon to have a separate frontend and backend team, which results in separate deploys, but this is usually coordinated so that you can do simultaneous deploy if there are breaking changes.
After messing around with React Redux I am ready to begin the backend processing with PHP and MySQL on my website at x10hosting. How would I deploy my app?
Im a little confused. I believe I can also deploy it to android and ios if I am not mistaken? So I would compile the files in the terminal using some command and then upload to my server?
From what I hear you would need to have java supported on the server but correct my on anything if I am wrong. Im still new to this. I have heard of services such as Heroku but I havent looked into it too much. Is this better than trying to host the app files on my own website?