-
Clone SynchWeb from GitHub
cd /scratch/SynchWebDevEnvWS/server/www git clone https://github.com/DiamondLightSource/SynchWeb --depth 1
Overview of SynchWeb directory structure:
cd /scratch/SynchWebDevEnvWS/server/www tree -L 1 SynchWeb
SynchWeb ├── api ├── client ├── docs ├── LICENSE.md └── README.md
SynchWeb comprises two components:
/api
The back end API written in PHP./client
The front end web app written in JavaScript. -
Copy configuration documents
cd /scratch/SynchWebDevEnvWS cp ./resources/config.json ./server/www/SynchWeb/client/js cp ./resources/config.php ./server/www/SynchWeb/api cp ./resources/class.auth-dummy.php ./server/www/SynchWeb/api/includes
-
Install Composer
Composer is an application-level package manager for PHP.cd /scratch/SynchWebDevEnvWS/server/www/SynchWeb/api wget https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer -O - -q | php -- --quiet
-
Install PHP dependencies with Composer
cd /scratch/SynchWebDevEnvWS/server/www/SynchWeb/api php composer.phar install
-
Install npm
TODOcd /scratch/SynchWebDevEnvWS/server/www/SynchWeb/client module load node npm install
-
Build
TODOcd /scratch/SynchWebDevEnvWS/server/www/SynchWeb/client nano ./src/js/config.json Add "production": true, "build": <git hash>, npm run build Keep git hash in config.json current to avoid SynchWeb reload loop!
-
Next : Control Servers