Do I need a Framework for Deploying a Postgres + Express + React + Node App - node.js

I am a new self-taught developer.
I have created a simple full stack app (learning management system) using PERN stack. Now, I want to deploy it to learn the end-to-end process of creating a web app. I have a plan to make incremental improvements in the app and add more functionality to make it usable.
While researching for deployment, I came across various posts that doesn't recommend using create-react-app for production ready React apps. Further, this official article from React recommends using some toolchains for deployment (I think it is another name for Frameworks or set of tools):
https://reactjs.org/docs/create-a-new-react-app.html
Another alternative is to optimize the code using Webpack etc. before deploying it. I am neither familiar with any React Framework nor much aware of performance optimization for PERN apps.
If I have to use a framework, then my existing code may not work. I may have to do complete review of the same to make it suitable for the framework.
What is the best way to deploy my PERN app which I can scale in the future. (I have partially understood the concept of client side and server side rendering. As of now, users have to login to use app. But in the future it will be like the users can see the page (to take advantage of SEO) but need to login in order to interact with the site).
Do I need to learn a framework? (In that case I may have to develop all the code in that framework to maintain compatibility). If this is the case, then I will be glad to know which one?
Or, is there other way to deploy fully-functional PERN apps ready to use by potential customers.
Eagerly looking for some answers as I am completely confused at this point.

Related

Is there a way I can use docker and containerize different features of the node js application?

I'm currently working on a big project that requires many features, some features of the app will be working and sometimes, when I start another feature, I may encounter an error and the whole app will be down.
I want to know if there's a way I can create the different features of the app api seperate from each other, so that when one feature has an error, the server will not be down only the feature can be down and when i'm deploying it, it will have one base url.
That's why i'm asking if there a way I can use docker and containerize different features of the node js application am working on?

Does STRAPI helpful to develop REST api to connect Flutter app easily and cost effectively

These days, I'm developing a Car Service application using Flutter. I already developed my flutter app using mock data with json files. This is my flutter app
https://play.google.com/store/apps/details?id=com.clivekumara.srilankacarwashfinder
Now I want to develop own rest api. Basically below requirements should be handled in the rest api.
1. Image Uploding and store images
2. Mange authentications
3. Other entity crud operations
4. Location base functionalities.
For fullfill above requirements I research a backend techologies. This api sholud be faster and easy to implement. Also deployment cost sholud be less.
For that I choose StrApi CMS platform with Mongodb to develop this requirement.
Can you give me some idea that choson technologies are compatible with the requirement. What are the cost effective deployment technologies (Hosting space, Database server etc...) compatibility with this Strapi and mongodb .
I use strapi for building static websites. Its pretty easy to use and build fast API. I also saw some Flutter apps built with strapi backend and they work flawlessly. It seems to be a good choice but might be challenging sometimes specially if you are building a very complex app.
You can use Heroku for strapi hosting. They have a free plan that will be enough for development purpose. Note that Heroku does not give you space for your uploads like images. You will still need to buy some space on S3 or Digitalcean spaces or other services.
DigitalOcean has a Oneclick installation of Strapi. It costs $10/month and if you add a $5/month space to your plan then you have $15/month to start. For database Strapi comes with SQL Lite by default but you should use Postgres or MangoDB to build your project for production.

What type of web hosting do I need if I want to run a Node.js app

I want to build a web app with React for frontend and Node.js for backend. The problem comes when choosing the type of hosting I need. I know that for static files(eg. html with css and js) it's enough to have a standard web hosting, but if I want to have a server running Node.js app, do I need a dedicated server or VPS? Why?
I believe you can have either. Are you trying to do this professionally for a client or for a side project?
Personally, I use services like Heroku or Netlify (others here: https://blog.bitsrc.io/8-react-application-deployment-and-hosting-options-for-2019-ab4d668309fd). They run builds of node for your app and are free initially.
You can host your app and publish it for no cost at the beginning. However, on something like Heroku, if you don't pay, it takes 5 seconds for your website to wake up. But, this is great for prototyping. It gives you a URL so others can see it. They are basically version control systems that publish what you currently have. So you can just live push your project at any time and it updates your site.
If your prototype is working and you want it to be a fully dedicated app, then you can either pay or find services that host it. I would recommend prototyping first regardless and wouldn't pay until you need to.

What are the steps to Host a REACT App which is using ExpressJS for back-end operations?

I have developed an application which is using REACT for front end and ExpressJS(framework for nodejs) for back-end. Code is running properly in my local machine.
I have no idea about hosting this application so that other people can use it.
Note: Both REACT project and Node project must be running parallel to make this application work
Appreciate your help !!
You can use this one https://www.heroku.com
It's a popular platform. It's free for a limited amount of space, so it's good to try out applications. It's pretty easy to use, you can even auto-deploy your app every time you push it to github repo, if you have one.

MEAN Project - Organization

I am wondering what are your best practices for a Single Web Page app project using the MEAN stack (MongoDB, Express, Angular and Node.js).
Right now we have the following organization:
One Git repository for the Angular Client side code
One Git repo for the node.js & express server side code.
I saw browsing some blogs and checking node.js boilerplate that a common strucure is to have only one repository to handle Angular Code and Server code.
I'd like to know, from the community, if this approach is really better than having 2 difference repo in terms of versioning, easy to deploy etc...
From my personal point of view, I don't see that much difference...
I don't see much difference as well. It should actually be driven by the team. Your code organization could be beneficial if you had a separate front-end and back-end teams. I've seen an environment when UI guys only downloaded UI portion and hooked up to REST back-end deployed somewhere on DEV server.
Number 2 is release procedure. If your front-end and back-end are tightly coupled they will be released together for 99%. Then you don't need to handle 2 repos. However if your back-end will serve as REST service end-point for other clients, not only your UI and you plan to release front-end changes without touching the back-end (no downtime for external clients) you may want to use two separate repos.
Also think about your CI server. You may want to run front-end an back-end builds and tests separately. However for most CI servers it does not matter either it is one repo or two.

Resources