School software engineering project on a web application for an airport transport service company.
- Frontend: HTML, CSS, JavaScript (React.js)
- Backend: Node.js (Express.js)
- Database: MySQL
Note: All the following commands are to be run from the root directory of the project.
cd frontend
npm installNote: The frontend server listens on port
3000by default. Make sure the port is available. If not, change the port in thefrontend/package.jsonfile.
cd backend
npm installNote: The backend server listens on port
5000by default. Make sure the port is available. If not, change the port in thebackend/server.jsfile.
Note: Replace
usernamewith the username you want to create andpasswordwith the password you want to use.
mysql -u root -p
CREATE USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost';
exitNote: Replace
usernamewith the username you created andpasswordwith the password you created.
cd database
mysql -u username -p
create database airport_transport_service;
use airport_transport_service;
source schema.sql;If you want to populate the database with some sample data:
source sample_data.sql;Create a .env file in the backend directory and add the following code:
Note: Replace
usernamewith the username you created andpasswordwith the password you created.
DB_HOST=localhost
DB_PORT=3306
DB_USER=username
DB_PASSWORD=password
DB_DATABASE=airport_transport_service
JWT_SECRET=secretcd frontend
npm startThe backend server should now be running on http://localhost:3000. You can test it by visiting this URL in your browser (if you have changed the port, replace 3000 with the new port number).
cd backend
npm startNote: If you are developing, you can use
nodemonto automatically restart the server when changes are made. To do this, runnpm run devinstead ofnpm start.
The backend server should now be running on http://localhost:5000. You can test it by visiting this URL in your browser (if you have changed the port, replace 5000 with the new port number).
Depending on your MySQL installation, the database server may already be running. If not, start the MySQL server (depending on your OS, the process may be different).
- Check the status of the MySQL server
sudo systemctl status mysql- Start the MySQL server
sudo systemctl start mysql- Stop the MySQL server
sudo systemctl stop mysql- Check the status of the MySQL server
net start | find "MySQL"- Start the MySQL server
net start MySQL- Stop the MySQL server
net stop MySQL