A tour trip booking module built with React, ExpressJS and mysql database.
The user is able to click on the booking calendar, choose a tour date, and check the availability and price.
Before you start, please have mysql database downloaded and create a config.js file in db folder, edit the password to your password:
module.exports = {
host: 'localhost',
user: 'root',
password: 'password_here',
database: 'trip_booking',
};
To download dependencies:
npm install
To seed database:
npm run seed
To start the server:
npm run start
When the page first loaded, you should see a booking module and click on the calendar. The default chosen date is current date and past dates are greyed out.
When you click on a date, you will see the page to choose traveler count and then see the total price and availability.
When the total selected travelers exceeds the tour seats on a certain date, you will see a tour not available page.
To run the automated tests:
npm run test
To create app docker images and deploy to dockerhub:
npm run build-docker


