Welcome to the Y STEM and Chess project! This document will guide you through setting up your development environment.
This project uses NodeJS version 14
For Linux: sudo apt install nodejs
For Windows: https://www.geeksforgeeks.org/installation-of-node-js-on-windows/
Nodemon is a utility that will monitor for any changes in your source and automatically restart your server.
For Linux: sudo npm install -g nodemon
For Windows:npm install -g nodemon
Apache is a widely used web server software
For Linux: sudo apt update && sudo apt install apache2
For Windows: https://httpd.apache.org/docs/2.4/platform/windows.html
You should have been given access to a script named create_dev_envs.sh
- Paste this file into the root of the react repository
- Run it in the terminal by running
sh create_dev_envs.sh
- If you are on Windows, you will have to run the script in Git Bash
This project consists of several services. Here's how to set each one up:
- Navigate to the
react-ystemandchess
directory inside thereact
folder. - Run
npm install
to install the necessary dependencies. - run
npm start
to start the React development environment.
- Navigate to the
middlewareNode
directory inside thereact
folder. - Run
npm install
to install the necessary dependencies. - Run
nodemon index.js
to start the server.
- Navigate to the
stockfishServer
directory inside thereact
folder. - Run
npm install
andnpm i dotenv
to install the necessary dependencies. - Run
nodemon index.js
to start the server.
- Navigate to the
chessServer
directory inside thereact
folder. - Run
npm install
andnpm i dotenv
to install the necessary dependencies. - Run
nodemon index.js
to start the server.
- Navigate to the
chessClient
directory inside thereact
folder. - Run
npm i dotenv
to install the necessary dependencies. - Start the chess client:
- On Linux: Run
cp -r * /var/www/html/
. You'll need to do this every time you make a change to thechessClient
directory. - On Windows: Copy all the files from
chessClient
into thehtdocs
folder of your Apache installation. Then, runhttpd -k install
andhttpd -k start
in your terminal. After this, you should be able to go to "http://localhost" and see the chessboard.
That's it! You've set up your development environment for the Y STEM and Chess project. Happy coding!