Best way to keep a React app updated on a linux server - reactjs

I am currently in college and am creating a portfolio website on my own to set myself apart from other students. I have set up a home Linux server and have hosted a personal website on it.
The issue I'm running into is having to constantly update the website with demos of new projects I've completed. I want to be able to do something like pushing new projects or updates to old projects to GitHub and be able to simply pull the updated repository to my server without having to delete the old project and build the new one on the server over and over.
Is there a best practice for this and does anyone have a good guide or documentation I can follow to figure this out? I know I can simply use hosting services that are drag and drop every time i update the code however I enjoy the complexity of running my own server and figuring out these issues.

Related

How does it work when there are multiple users accessing a React web app?

I am learning React.js and new to web programming. All along when doing my own projects it's only for my own use, and hosted on localhost:3000. (i.e. one user).
I have a question about multiple users which I don't know if it's specific to React or just general web programming, but I can't seem to find it online, as perhaps it's too basic? And sorry if it's a very basic question. I will have to make an app for internal use for a team of less than 10 people soon, and it will be hosted on a local server accessible by this team.
Would the code be any different in terms of how I write this app? (say, it's just a todo list where users are able to add and remove items)
Specifically, how do states work when there are more than one user? Are they stored on the user's local device?
If one user clicks a button and sets some state from true to false for example, does it re-render for the other users too? Or do all users get their own instance of the app?
I would also appreciate it if you would know what kind of resources I should look at for this question, as I would like to read more in-depth about it.
well, all the apps run on each user own machine independently. State, actions and all other(whole app) are happening only one user own machine. So there is no interaction if I may say so out of the box between different machines(users). You may achieve that with help of some sockets connections( for example instant chat)

How to give support of switch to old website from updated one?

I am little bit in confusion about this mechanism. Not sure this is the right way or platform to ask this, but might be I can get some idea at least.
I am working on a web app which has been already live for a long time. I have redesigned whole app with frontend technology of ReactJS and backed in spring boot. As the existing old web app (live web-app) is written in Spring MVC with bootstrap support and which is outdated. Now, we are done with the updated app code, and we are ready to make it live.
Is there any way to give user flexibility to use both web app at same time? Like existing web app which they are using and there will be one button or option from where they can able to get updated UI/UX. And the same thing If they are not feeling well with the new UI/UX they can switch back to old/existing web app.
It is little bit similar like Facebook did a time ago where they give option to "Switch back to classic".
For now, I have one idea in mind to give this support based on subdomain, but not sure is that a good way or technical feasible or not.

How can i update the data within my app without having the user update the app in the playstore

I'm taking a break from simple game development to do something totally different. I would like to create an android/ios app (something like a news app and new technology app) that i can daily update the data in it without having the user update the app every day within the playstore. My question(s) would be , what would be the easiest and less confusing way to do so. And would I be required to have a website to correlate it to and just sync data to the app.
I've researched for days and I have gotten some leads but none that really clarifies how it's done. If someone could show me a step by step or tutorials on this topic it'll be greatly appreciated!!
The best way to do this is to make the data available as a web service and have the app go fetch the data.

Setting up an Angular/Ionic Mobile Application with MongoDB

I was wondering if anyone could help me at all.
I posted a previous question in regards to this title but I didn't receive much of a response (probably due to lack of information).
I started out with an Ionic Application and built the view files using state URLS to navigate from page to page in the WWW folder. I've then created corresponding controllers for the view files, for basic calls and functionality that I want my app to do in the front-end via Ionic.
My question is how do I setup MongoDB + Mongoose so I can have access to the models I have created?
I have scoured the internet but to no avail, I mean I know there is no set way to define a model within this type of application but some general guidance would be really appreciated.
I understand that when building an application with Angular you're essentially building 2 applications, the front-end where your CSS, JS and HTML goes with the front-end frameworks on top of them.
Then the backend application that runs the server, stores data and runs the business logic. This is where I have created the User Schema model for my application and have inserted a document into my database via the MongoDB shell whilst running mongod.
However I also created a users.js in another models folder in my front-end where I'm returning a resource following a url with either a get, save, query, remove or delete.
First of all I would like to say I'm relatively new to building mobile applications so this may even be entirely wrong and secondly up to this point I get lost as to what to do in my application.
I have tried setting up an express server in my app.js file and I can connect to it via my terminal as it is listening on the port number, but in the browser it is coming up with cannot /GET.
If you need any more information please feel free to ask, I know I haven't really gone into any technicals, but I'm really not sure even if I'm asking the right questions to begin with.
Thank you in advance.

Keep data when iPhone app is updated (Monotouch)

I'm all new to this app coding but working with Monotouch makes it possible for me to actually do something :-)
I'm making an app that uses a database but I think it's likely that the app will evolve over time. If i submit an app to the appstore and users install it, it will over time store a lot of data.
Now, if I update the app and users get the update in app store what then? will the data be erased when they install the new version?
and what if the DB schema changes?
thx
Nicolaj
Thx jason!
I also searched a bit more on my own and found this which also explains: How to update SQLite DB on iPhone app update?

Resources