A webpage with a calculator and a list of recent calculations.
The site is running live here: http://52.15.174.58/frontend Create an account, sign in, and then use the calculator and see recent calculations made by any of the users.
The backend uses PHP and MySQL. The frontend uses React with JSX. To set up:
- Set up a PHP server. On Ubuntu this is as simple as
sudo apt install apache2 mysql-server php7.2-cli php-mysql && sudo service apache2 start - Clone this repository to your server
- Set up the database. Create a MySQL user and put its username and password into the
config.phpfile in this repository. Run the commandphp install.php - Set up a JSX preprocessor. You can do so by following the steps at the bottom of this page https://reactjs.org/docs/add-react-to-a-website.html
- Create a folder called
react_compiledinside thepublic/frontendfolder. Run the JSX preprocessor on all of the JavaScript files in thepublic/frontend/reactfolder and put the output into thereact_compiledfolder.