Installing the Web Server Ensure that both Node.js and npm is installed on the machine. sudo apt-get update sudo apt-get install npm Find the MySQL server's listening port from the config file at [mysqld]. /etc/mysql/my.cnf Change the fields user, root, port of the MySQL configuration in the FoodWasteTracker's index.js: var connection = mysql.createConnection({ host : 'localhost', user : 'YOUR_USER_NAME', password : 'YOUR_PASSWORD', database : 'food_waste_tracker', port : 'PORT_NUMBER_MYSQL_IS_LISTENING_ON' }); Now install all the dependencies npm install Then run the web server in the background sudo npm start& If the program takes control of the shell, CTRL-C in order to stop it. Now jobs should show the web server running in the background. It should now be running on the machine at port 80. In Case of Failure Ensure that MySQL is running sudo service mysql status sudo service mysql stop sudo service mysql start Ensure that the web server’s port isn't already in use
Installing the Web Server Ensure that both Node.js and npm is installed on the machine. sudo apt-get update sudo apt-get install npm Find the MySQL server's listening port from the config file at [mysqld]. /etc/mysql/my.cnf Change the fields user, root, port of the MySQL configuration in the FoodWasteTracker's index.js: var connection = mysql.createConnection({ host : 'localhost', user : 'YOUR_USER_NAME', password : 'YOUR_PASSWORD', database : 'food_waste_tracker', port : 'PORT_NUMBER_MYSQL_IS_LISTENING_ON' }); Now install all the dependencies npm install Then run the web server in the background sudo npm start& If the program takes control of the shell, CTRL-C in order to stop it. Now jobs should show the web server running in the background. It should now be running on the machine at port 80. In Case of Failure Ensure that MySQL is running sudo service mysql status sudo service mysql stop sudo service mysql start Ensure that the web server’s port isn't already in use
FoodWaster_report.docx