What are the best practices for GRANDstack installation in Azure? - azure

I have to start a GRANDstack (GrapQL, React, Apollo, Neo4j Database) projet from scratch in Azure.
I know that for Neo4j Database I can install a Virtual Machine on Azure.
But for GraphQL, React and Apollo I don't know what are the best pratices to install them in Azure.
For example, do I have to install Azure app service, Azure functions ?
I don't know how do I have to put each component of GRANDstack in Azure.

Apollo can be hosted in Azure Functions or you can use a web framework such as Express or Koa which can be run in an App Service.
For the React component, if you're using an App Service, then you would host it out of the web framework you're using (Express, Koa, etc.) to host the static assets that are generated when converting the JSX to JavaScript.
Neo4j has docs on deploying to Azure.

Related

Azure AppService - How to connect and deploy front and back

I'm absolutely new to Azure, CI, and CD.
I have an app consisting of a frontend developed under React + Typescript which sends CRUD requests to a typescript backend. Both front and end are NPM projects.
I've no idea on how to step from development environment to production, deploying to Azure.
Should I create two separate AppServices, one for each project?
If that's the case, how do I then connect them?
Do I just need to change the URL the server listens to?
As you can see I've no idea of what I'm doing but I'm eager to learn so any feedback is much appreciated
The most common approach is
Deploy frontend app ( react ) in one app service.
Backend nodejs app on a different app service.
Then, call the api of the nodejs app from the frontend.
Or,
Set up and run the client and server on the same server using a gulp file and deploy that project on an app service. In that case, there is no cross-site communication. This is the most preferred one.
Using the same app service for both front end and back end application. Refer nodeexpress-backend-with-angular-front-end-in-a-single-azure-web-app.
Using Cors to connect front end and backend Check here
Refer SO Link 1 & Link 2
And You can use deploy staging slots in app service to use different environment like (test/dev, Production).

Can I only deploy the server side of my react native app to Heroku?

I have a react native app that I'm building using expo. For the backend, I am using node.js and Express.
My app hierarchy is such that I have a frontend folder and a backend (server) folder. For example,
Root
|
|Frontend
|Various screens & associated files
|Server
|Routes & other files
For my project, is it possible to just host the backend and not the rest of the app? Such that when I fetch data in the frontend using HTTP requests, instead of routing through localhost (http: //RandomIP:PORT/route) I would use the heroku address as the routing address. I would also host the SQL database along with it.
I tried to follow along with the Heroku documentation, but it seemed like that was for hosting the entirety of the app / web apps instead of mobile, and I ran into constant errors.
I would like to point out that, unlike web pages, mobile apps cannot be hosted on the server and fetched on-demand. In other words, do not try to upload your react-native code to Heroku instead just upload your backend only and then make HTTP requests through the URL provided by Heroku after you have deployed your code.
Therefore go into your backend codebase, initialize a git repository and just deploy that Heroku. Also, you will need to host your SQL database on another service such as Google's Cloud SQL or Amazons AWS Database Services.

How to deploy socket.io and React app to Azure?

I'm a total newbie to web development, so please guide me.
I've successfully finished a socket.io and reactjs website locally using tools like webpack and babel. There's one Nodejs server file(also has socket.io) and remaining all are client-side files.
I want to deploy this app to Azure using Azure App Services.
How can I achieve this?
Thanks!
You can try going through Create a Node.js chat application with Socket.IO in Azure App Service. For webpack application, you can check out my earlier post on SO.

Running Mongodb CRUD API on azure (for Ionic)

I'm trying to run a MongoDB (using NodeJS and Express) on the Azure Server as a server side part of my ionic app.
Once placed on Azure I'd like to access it with my Ionic App using CRUD operations.
What steps do I go through after acquiring a Azure Portal account? Do I take Mobile Services or a simple Web Api?
Is there something specific that I need to add to the NodeJS server?
Generally, the app using Node and MongoDB as the backend for mobile client hosted on Azure App Service, such as WebApps, Mobile Apps (recommended).
Based on my understanding, I think there are some documents that may be helpful for you, please see them below.
For Web Apps, you can refer to the tutorial Get started with Node.js web apps in Azure App Service.
For Mobile Apps, I think your ionic app was based on cordova, there is a tutorial for getting started with cordova Create an Apache Cordova app. And Two related blogs shown a sample of Node + MongoDB on Azure for mobile, please see below.
Exposing MongoDB collections on the node.js backend
Querying MongoDB collections via the Azure Mobile Service node.js backend
To deploy the app to Azure App Service, you can try to publish it via FTP, git, or IDE like VS, please see https://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/.
Hope it helps. Any concern, please feel free to let me know.

deploy a nodejs app using a chromebook

I have developed a nodejs app using cloud9IDE on my chromebook. It seems that I cannot install the package management applications needed to deploy to a hosting site such as nodejitsu or heroku. However it seems that I can upload an app folder to AWS elastic beanstalk, but I am a little scared of their pricing model.
Do I have any other option besides AWS (and buying a new computer)?

Resources