UserVM Handbook: Difference between revisions

no edit summary
No edit summary
No edit summary
Now that everything is set up, you can bring your VM online. To run the server right from your terminal, run the following command:
{{code|
(collabvm) $ npm runyarn serve
}}
Or alternatively, to run it directly:
{{code|
(collabvm) $ node buildcvmts/dist/index.js
}}
=== Setting up a service ===
# allowing you to use the same server for all your VMs.
WorkingDirectory=/srv/collabvm/collabvm-1.2.ts/
ExecStart=/bin/node /srv/collabvm/collabvm-1.2.ts/buildcvmts/dist/index.js
 
[Install]
name="collabvm"
command="/bin/node"
command_args="/srv/collabvm/collabvm-1.2.ts/buildcvmts/dist/index.js"
# If you have multiple VMs, you can change --chdir to a different directory on each VM, to use different config files on the same server
supervise_daemon_args="--user collabvm --group collabvm --chdir /srv/collabvm/collabvm-1.2.ts --stdout /srv/collabvm/out.log --stderr /srv/collabvm/error.log"
Now you can build the webapp, and serve it:
{{code|
$ yarn
$ npm runyarn build
$ npm runyarn serve
}}
This will run the webapp at <code>127.0.0.1:1234</code>, which you can navigate to in your browser. If all went well, your VM should show up. If not, and you don't know why, join our discord and ask for help there!
If you want to host the webapp on your website, you can build it as follows:
{{code|
$ npm runyarn build
}}
Then, copy the contents of the <code>dist</code> directory to your website. For example, if your webroot is at <code>/var/www/example.com</code>, and you want your webapp at example.com/collab-vm/: