I created a react native application with expo. and I use nodejs for backend.
my application is ready and works well locally. now i would like to deploy it and i would like to know what are the good methods to deploy it should i use docker kubernetes etc... if or what platforms would you recommend me.
thank you
Welcome to the stackoverflow community!
For frontend I would suggest deploying it to the google play on android, or app store on ios. But you would need to pay a fee of $99 per year to deploy apps to the apple app store.
If you would like to deploy to other platforms, try to deploy to the official stores, because official stores have more traffic and can be trusted by more people. Thus getting more customers or users to your app.
For backend I would use heroku to deploy my backend code, I have many projects on heroku and it works fine, also it has a free plan for hosting your app. But it's not just flowers and roses, heroku is quite hard to deal with and their service is not the best in my experiences. If you are looking for a enterprice way, I suggest google cloud or firebase, It may cost some money however the performance, the service and user interface is way better than heroku.
More information about heroku: https://heroku.com/
More information about google cloud: https://cloud.google.com
More information about firebase: https://firebase.google.com/
More information about how to deploy: https://docs.expo.dev/distribution/app-stores/
More information about Apple app store: https://developer.apple.com/programs/
More information about google play store: https://play.google.com/console/about/guides/releasewithconfidence/
Tutorials that may be useful:
https://www.youtube.com/watch?v=6IPr7oOugTs
https://www.youtube.com/watch?v=4D3X6Xl5c_Y
https://www.youtube.com/watch?v=oWK7kesoCQY
Hope this helps!
NOTE: I'm not sponsored by ANY of the companies above, and I'm just a regular human being on the internet.
Related
I am planning on building an application that I want to deploy both on web and mobile. I would like the logic of the application to work offline for the mobile app, but when reconnected to the internet it should sync with the database so that it is the same as if they were doing things offline.
The application will have users with data that they can share with other users - changes do not need to be shown in real-time.
Does anyone have recommendations on what database provider would be helpful for this, and what backend tech stack I should use so that the offline syncing works?
I'd go for either RealmDb or firebase. Depends on your needs.
I have been involved lots of companies' production projects but I didn't build myself. I built a react native app. But I am really confused where I should store data, backend service and push notification also. Which platform can be wise chose to use all 3 of them. Backend rest service will be nodejs. Unfortunately, I spend my 1 year azure free trial. I need to first try my app performance and users should use my app also, then should be free for trial to some amount of time.
If you developed your app to be in container you can use k8s as a service from one of the providers.
All of the top cloud providers have a multitude of solutions so its up to your arch and funds to decided where to go with it.
I do not think anyone will be able to give you better answer then yourself as your know the intimate details of your architecture.
I'm developing a simple site consisting of an Angular frontend and a simple NodeJS backend. I currently see 3 ways to setup the project:
have 1 Web App to serve the static HTML and 1 Web App for the NodeJS backend
serve both REST API and static files using the same NodeJS instance
I read about virtual directories for Azure Web Apps, but wasn't able to find appropriate documentation. Is that even a viable solution?
What's the standard setup to use for Azure? Is there any in-depth documentation I missed?
I would say that this is a type of question for which it is difficult to get an answer, because someone could write an entire book on this topic and a lot of aspects are a matter of personal preferences, approaches and so on.
Before I try to attempt a first answer I would like to point out that I am not familiar with Node.js at all, but I am fairly familiar with Azure AppService and ASP.Net Core MVC.
There is no standard setup in Azure AppService (websites in this case) and in fact all the 3 options that you mentioned are valid. Based on my expperience with Azure AppService I would say that option one is suitable when you have a publicly available API. In that case you could also register your API with Azure Management API.
The second option is, in my opinion, best suitable when your frontend is the only consumer of your API.
The third option is not that common, but 100% possible. Here is a very good article on how to set virtual directories up and how to deploy an application to them using Visual Studio. I am not sure how this would be done exactly with the tooling at your disposal, but conceptually it should be possible. However, deploying NODE.js projects in virtual directories could cause some problems you should be prepared for. More information here.
I would however stick with what I said in the start: I would deploy both backend and frontend to the same web app if my Angular application is the only consumer of the API and I would deploy to 2 different web apps if my API was public.
I'm curious what other might think in this regard.
Can anyone please point out any benefits of using Azure Mobile services vs using a plain Azure app service / clean web api? For a starter / project type for a backend mobile solution.
I have somewhat mixed feelings on why I would want to use Azure Mobile Services.
As far as I see on Azure Mobile services you have an easier way of authenticating, you can use the notifcations hub more easily
and you have the different "built-in" ways of handling data (table storage etc).
Usually you would want some custom logics, user registration and handling when users register to your backend and you would like a more solid way of handling
and storing the data not privided by the OOTB datastorage.
You might also have another preference than using the /Table/ odata-endpoint you get with it or end up doing lots of logics to make your DAO's return data in properly for the OData endpoints.
All these things; IMO makes it more difficult to make the API/backend clean when using Azure Mobile services rather than a simple Web API with OData endpoints and swagger documentet API that can be used in a mobile-app just as easy.
Implementing / handling authentication and notifications ++ in Web Api ain't that diffucult nor time consuming.
So my problem Azure Mobile services is that it tends to fine for dev / prototyping and testing, but it might get really messy really fast when developing a proper backend.
Any thoughts and reasons why one should choose one instead of the other?
Think of Azure Mobile Services as V1 and App Service/Mobile App as V2. While Microsoft hasn't announced that Mobile Services will be phased out in the near future, if you start a new project, you should definitively look at App Service.
due to the fact that many people are confused about wether to take Web API or Web App or something different. They are going to put it all under one name. The underlying technology will be the same "i think".
But now you'll have in your portal the opportunity to add mobile push notifications, or add your swagger api definitions.
So when you're goint to stick with App Services you're not going to limit yourself.
Even when you're going to take Web Api you'll get all the functions as if you would take an App Service (if i'm correct).
*Edit: I looked it up in the portal. As I said, my old Web App Projects have the same settings as Web Api projects. So you don't need to decide anymore which kind of project you're taking. You get all the benefits out of the App Service.
A couple weeks back our Mobile App was migrated from the old portal to the new one and it hasn't behaved properly since.
Our main issues are:
We cannot access any logs files, the tab for Diagnostics logs stopped working entirely on Wednesday but even before that we never got any useful data out of this. When something goes wrong with our nodejs backend we can't find any clue as to what went wrong like we could in our old portal under the logs tab.
We are unable to access the FTP server entirely, it just won't let us login even though the credentials are correct and have been reset multiple times in attempts to get them working.
The server is throwing errors about not having enough disk space left even though we should have 53Gb to go (we're currently using 1.05Gb out of 55Gb)
Our deployments slots are not working at all, when we push our code to the deployment slot it just doesn't work, every request we make to the deployment slots tells us we're not allowed to do anything.
We are running a standard tier Mobile App server. The backend is in NodeJS, our CMS is in ASP.Net and our app itself is in Xamarin Forms.
The issues started after we migrated the server a couple weeks back from the manage.azure.com portal to portal.azure.com.
What can we do?
Edit:
We got through to Microsoft via the payed support plan which we're getting refunded because these are basic functionalities which don't work as advertised after the migration. I've got a call with them in about three hours to get things sorted, if I learn anything we can do ourselves I will update this post to share the knowledge.
This needs to be a support request to Microsoft.
If you can, open an incident with Microsoft Support. If you can't, post a question in the MSDN Community Forum. (We need to ask about particulars of your site and that isn't an appropriate topic for SO)
As the architecture of Mobile Apps is changed from Mobile Services, now the mobile apps migrate to Azure App Services.
Actually the Mobile Apps backend in Node.js is an expressjs project, and the mobile app sdk for node is a middleware of express. So the way for diagnostics and troubleshooting has changed from before we use Mobile Service. You can refer to https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-node-backend-how-to-use-server-sdk/#Debugging for details about Debugging and troubleshooting for mobile services.
Additionally, we can leverage the Visual Studio Team Services editor as the section How to: Edit code in Visual Studio Team Services shows in the link above, we can monitor the output of the Mobile Apps backend application. E.G:
About your FTP issue, please double check your deployment Username, when we login to FTP server on Azure, we need to input the full FTP user name which is "app\username":
You can refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/#enabling-diagnostic-logs for details.