Existing Website to support Node.js web server - node.js

I have developed a simple website in php. I use WAMP server to run the website. As I am new to Node.js environment, I found that we can create Node.js Web Server and run our webpages on it. Is it possible to run my php webpages on Node.js Web Server? How can i make my php webpages to run on Node.js Web Server?

No, you can not run PHP through Node.js. Usually you would use your existing web server (that you use for PHP) as a reverse proxy.

Related

How can I convert a Node Js web application to a desktop application?

I have created a Node js Web application which is running on an express server. It is a web automation application which is made using puppeteer. I want this app to run in headful mode which is not possible if I deploy this on servers (for eg Heroku). So instead of deploying this application,I wanted to create a desktop app which runs this application on the local host everytime. Is there any way to convert this web application to a desktop application and run it on local host through the desktop app only?
Your best bet would be using Electron.
It is used for cross-platform apps with Nodejs and interacts like website, so you wouldn't need to rebuilt your app from scratch.

how does node js, when used as a server, can be defined in the context of a web server/ application server?

I try to understand the architecture nodejs, when using it as a server trough framework such as express.
I know all these concepts of web server, application server, and a web container but I don't
think that I fully grasped where does nodejs as a server it's to all of this.

Deploy NodeJS application with IIS

I would like to deploy internally my Node application build with Express on IIS, but I don't know how.
Does anyone have an idea or can redirect me to a tutorial ?
You cannot host your Node.js application on IIS. You can use IIS as revers proxy for your Node.js application.
Then you would start your Node.js application on your Node.js and setup IIS to rout requests to your Node.js application hosted on Node.js.
Tutorial for something like this can be found here

Is using node.js is suitable for web GUI app and using same source for desktop app?

Im thinking about using node.js for web application , that is something like tomcat with servlents or Apache and php.
my questions are basic but fundamental:
1. can i use node.js as web server? using jquery and all the server side stuff?
2. i want to let the users to be able to use the application in offline mode , and let
the user to download the web app as desktop app .
can node.js be good for this job ?
Node.js is a platform for creating server-side and networking applications. You can use its HTTP and Socket support to create a web server.
And yes, you can use client side libraries and frameworks like jQuery, Angular.js, Ember.js, etc etc. by using a Node.js REST API as backend (as a possible solution).
You can make desktop applications using:
Node-QT bindings
Appjs

Deploy node.js on local server

I am currently running a website written with Flask on a LAMP server. I used mod_wsgi to connect the Flask app with Apache, and all is running well. However, I recently discovered websockets and would like to use them in my website. There is a Flask extension for websockets, but I was told Apache does not support websockets and that I could not use it.
I was introduced to Socket.IO running on nodejs at school, and I would like to try it out for my website (rewrite my website using nodejs). My question is how do I run the nodejs app from my local server as I did with my Flask app? I have searched Google, and people are recommending using Apache or Nginx, but will they support websockets? Thank you.
By launching your nodeJS server... Take a look at : A simple TCP based chat server written in node.js
(I'm not the author and I don't know him)
Then just: node myFile.js

Resources