PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, February 11, 2022

[FIXED] How can I interconnect a Node.js Application server and a LAMP stack?

 February 11, 2022     apache, lamp, mysql, node.js, php     No comments   

Issue

My current web-application requires a LAMP stack and a Node.js WebSocket server to operate. Interaction between the MySQL database and the Node.js webserver is absolutely critical.

How may I have them communicate? I am likely going to host the LAMP stack and the Node.js server on different AWS instances.

Insight is much appreciated, thanks!


Solution

Nodejs has many modules that can connect with a MySQL database. node-mysql is one of the more popular ones.

Instead of using the default localhost you will need to specify the remote address of your LAMP stack.

As long as both your LAMP stack and the nodejs server are located in the same availability zone you should not have any major performance issues.



Answered By - saeed
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing