-
Modify the
buildscript inpackage.jsonfile:"build": "tsc && vite build --base ./",
-
Use SSH to login to mltgpu-2.
-
Create a folder inside
/srv/www/path (first,cd /srv/www/) with the same name as your gus-account, e.g.gusxxxxxx. -
On your machince, build your app:
npm run build, this will produce adistdirectory with a few files in it. (More information can be found in Vite documentation).- If you are getting errors, you might consider excluding files that you are not using
tsconfig.json(i.e."exclude": ["src/dmParallel.ts", "src/dm2.ts"]). You can also relax other TypeScript checks, e.g."noUnusedLocals": false.
- If you are getting errors, you might consider excluding files that you are not using
-
Copy the contents of this directory to your folder on the server:
scp -P <PORT> -r dist/* gusxxxxxx@mltgpu-2.flov.gu.se:/srv/www/gusxxxxxx/ -
Access your app at https://dev.clasp.gu.se/mltgpuweb/gusxxxxxx (protected by password).
Note: in some cases, the access rights are incorrectly set. In this case you are likely to see the HTML page but other code won’t load. In this case run the following command in your /srv/www/gusxxxxxx/ directory:
chmod -R a+rX assets