Node JS with MySQL Powered by GlobalSolutions
Node JS

Powered by GS
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast and scalable network applications.Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient,perfect for data-intensive real-time applications that run across distributed devices.It also provides a rich library of various JavaScript modules which simplifies the development of web applications using Node.js to a great extent.
Node.js is a cross-platform runtime environment for developing server-side and networking applications.Node.js library is very fast in code execution.Node.js uses a single threaded program and the same program can provide service to a much larger number of requests than traditional servers like Apache HTTP Server.Node.js applications never buffer any data.We also have added PhpMyAdmin which allows you to manage your databases easily.
Sample Programs
- We have the following sample program under "C:\helloWorld "
- Server.js -a simple program which starts as a web server. You can run the program in the following ways,
- You can start the nodjs by launching the the node.bat icon on the desktop
- This will run the application in the foreground. You can check that the application is running by opening a browser in your local computer by pointing to http://127.0.0.1:80 . You will see an output.
- You can make the process run in background using pm2 and Nodemon.
- Both pm2 and Nodemon are already installed in the server.
- To run the same application on background use the following command :
- C:\helloworld>Nodemon server.js ( or ) C:\helloworld>pm2 start server.js --watch
MySQL Database Connection
We have created a sample program to check the MySQL database connection which is under
“ C:\helloworld “ . Edit
db_connections.js with notepad++ and enter your instance id (you can find this from your AWS Console) in the password variable. Save the file and run the below command,
- C:\helloworld>node db_connections.js