How do I run Node Js on my VPS server - node.js

I write my server file with node.js and has successfully test in my local , i install node.js and mongoDB plugin on my server , that is windows, but when i type server url instead of my ip in my android app I can't find server and get error server not found
Please help me

Related

My Ionic app can't access my local Node server from Android emulator

I'm trying to run for the first time my React/Ionic app on an Android Emulator using Capacitor. The app should connect to my local Node server using Axios.
While my app started successfully on the emulator, all server requests failed with Msg: Error: Network Error
Here's the steps that I did:
I configured Axios to connect to http://10.0.2.2:3001 instead of localhost, but the requests still fail
I opened the url http://10.0.2.2:3001/api in the Android Emulator Chrome browser, and it succeeded in connecting to my server and returning a response
I tried adding to my capacitor.config.json file the following conf, but my app still fails
"server": {
"allowNavigation": ["10.0.2.2"]
}
Would you have other advices I should try to make my app connect to my local server? Thank you
After searching, I found the solution in another SO question :
The problem comes from the fact the my app uses http instead of https requests which Android forbids by default, starting with API level 28.
To allow http requests, I added android:usesCleartextTraffic="true" to my app's AndroidManifest.xml
Reference: https://developer.android.com/guide/topics/manifest/application-element#usesCleartextTraffic
if you use instances on cloud, modify host file, on linux the rute is : /etc/hosts
add this line:
localhost < ip-public-your-instance >

Communication between Angular2+ app and Node.js after deploy

I have deployed my Angular 6 App and Node.js to the Linux server.
There are two separated folders
The first, I run ng serve --host=**.**.**.*** to start Angular App
There is my Angular packege.json
My auth.service.ts
My Node.js server looks that
My folder hierarchy on a server
The server is Running on Port 3000
With my IP url in auth.server.ts I've got console error
And my question is "which port has to listen to my Node.js and which url I had to write in my auth.service to set up communication between them?"

Express server unable to proxy to my React project

I have an issue, my server is giving me an error that it is unable to proxy from localhost:8080 to localhost:3000 on my local machine, it also showed a Http parse error together.
I am trying to run a React and Express project and it worked when I used cloud9 to run it.

Difficulties connecting to socket.io server with Ionic

An overview of my setup:
A socket.io/node server is being hosted/ran on a computer in my local network.
An Ionic app is attempting to connect to the socket.io/node server to send/receive messages.
If I run the app in the browser with 'ionic serve', I am able to connect to the socket.io/node server successfully.
If I run the app in the emulator or on my device, I am only able to connect to the socket.io/node server if I add the -l (livereload) flag (ionic run android -l).
Originally, I hosted the node server on a heroku instance. I had no troubles connecting with this setup from browser, phone, or emulator. I had to switch to running the node server on a local computer so I have access to a local database.
Any ideas what is going on?
I fixed it by adding 'http://' to the beginning of the connection string.
Not sure why Ionic's livereload enabled me to connect without the 'http'

Red5 server: NetConnection.Connect.Closed

I have installed Red5 server (0.9.1) on the Linux server, but I am having some problems to install any app on my Red5 server using the installer.
The front page (http://my.ip:5080) works great, but when I try to go to the installer (http://my.ip:5080/installer), I get an error message like this:
Trying to connect
Net status: NetConnection.Connect.InvalidApp
Net status:NetConnection.Connect.Closed

Resources