Could the server and app run in the same domain? - heroku

The situation I met is that.
I design a frontend app by React, but I want to connect to MongoDB.
From what I knew so far, I could only connect to MongoDB in the backend. So, I use the express to set up a server but when I try to connect the frontend to the backend, the answer I found seems to tell me that I should run the server and the app on different domains, so I should run the server and app on different Heroku apps.
Could I put the server and app in just one Heroku app and connect between them?

Related

Questions regarding deploying a Next.js and Express web app to heroku and vercel

I have a project that I want to deploy which uses Next.js for the frontend and Express and Node for the backend. I would like to deploy this to heroku (backend) and vercel (frontend) once I finish building it but I have some concerns. Is this file structure ok?
If I have both my frontend and backend in one folder, would this still be possible? How am I able to connect to my frontend from the backend if I deploy on two different hosting services, is it possible to connect to my Next.js frontend from my heroku backend? In my backend I have a .env file which will contain my MongoDB URL to the database, how do I attach my .env file to the heroku backend so it can read it?
I'm a bit confused on this topic and some help would be greatly appreciated!

Connection to HTTPS server offline with a PWA

currently I am working on PWA (progressive web app) that needs fully functional offline capabilities. Currently the client is hosted on Heroku and is fully functional offline, besides one key feature. The PWA is not able to connect to the local server I am running from a separate computer. I made a self-signed cert so the localhost server computer is able to connect to it's running server via HTTPS; but I am unable to connect a different computer on the LAN to the same server. I'm fairly new to certificates and how they work, and I can't seem to figure this one out.
Just needed to make a server endpoint where I could accept the certificate. This was weird initially because the application is a SPA. So currently the user would have to differ for the initial setup.

Laravel switching from MySQL to MSSQL

I'm currently developing a web apps for my client, and my development server (a shared hosting server) only support MySql. But I just came to know that my client on whose server I'm going to deploy the laravel web apps on only support Mssql.
So my question is, later when I deploy the laravel web app on my client's server, what should I do to make the web apps works perfectly well? Is it enough if I just change the default driver from mysql to sqlsrv?

Accessing a Firebase-deployed App over a VPN

I built an app to offer a client of the company I work for that I deployed to Firebase. It uses Firebase storage for retrieving files as well as the realtime database. It's actually just the front-end portion of a two-app suite I made; the backend portion is used by an admin for uploading files, checking data, etc --- which data then becomes available to view over the frontend. Both use firebase.
It turns out the devices that would need to access the app (tablets mostly) are inside of an extranet with a server that can establish VPN connections only. Now I'm being asked how I can build the app so these devices can access the app.
I don't know much about the inner-workings of Firebase but it seems to me I may have couple of options:
1) Figure out how to make the FB database accessible over VPN (preferable)
2) Reconfigure the app to use something like MongoDB. Instead of deploying on a remote server, let the on-site server service the devices using the app. Send files that are needed by the server via FTP over the VPN, then process these files on-site.
Problem: I'm using a Mac and the on-site server uses Windows. It will be a pain to install things on a Windows machine remotely, let alone set up the VPN.
Any ideas? I'm sure there are parts of this question where I've made wrong assumptions --- I've never needed to do things over a VPN before.

Does an online Android application generated by GeneXus connect to the database?

I'm using GeneXus X Evolution 3 and I want to install it in a production environment.
The web app works well, but the android one does not. It fails when starting.
Does the android app connect to the database hosted in the server? If so, how do I need to configure ports or what do I need to set in the datastore properties?
The native android application does not access your database. It accesses REST services hosted in your applications server and those connect to the database.
So what you have to set is the Services URL property.
If you have problems accessing the REST services, you may have some issues related to URL Rewrite or other common issues.

Resources