简体   繁体   中英

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

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM