UserVM Handbook: Difference between revisions

no edit summary
No edit summary
No edit summary
(collabvm) $ node cvmts/dist/index.js
}}
== Running a local webapp ==
Before you put your VM on the UserVM roster, you'll probably want to test it out for yourself. For that, we'll throw up a test webapp. Start by cloning the source:
{{code|
$ git clone https://github.com/computernewb/collab-vm-1.2-webapp.git
$ cd collab-vm-1.2-webapp
}}
Then, copy <code>config.example.json</code> to <code>config.json</code>, and replace ServerAddresses with your server address:
{{code|
"ServerAddresses": [
"ws://127.0.0.1:6004", # If you're not using proxying
"wss://example.com/collab-vm/vm1" # If you are using proxying. Remove one of these lines.
],
}}
Now you can build the webapp, and serve it:
{{code|
$ yarn
$ yarn build
$ yarn 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!
=== Setting up a service ===
While it's useful and convenient to run your VM from the console while debugging, we <b>strongly</b> recommend you set it up as a service once you're ready to leave it on for extended periods of time. This is done differently depending on what init system your distro uses (Probably systemd, if you're not sure)
$ sudo rc-update add collabvm
}}
== Running a local webapp ==
Before you put your VM on the UserVM roster, you'll probably want to test it out for yourself. For that, we'll throw up a test webapp. Start by cloning the source:
{{code|
$ git clone https://github.com/computernewb/collab-vm-1.2-webapp.git
$ cd collab-vm-1.2-webapp
}}
Then, copy <code>config.example.json</code> to <code>config.json</code>, and replace ServerAddresses with your server address:
{{code|
"ServerAddresses": [
"ws://127.0.0.1:6004", # If you're not using proxying
"wss://example.com/collab-vm/vm1" # If you are using proxying. Remove one of these lines.
],
}}
Now you can build the webapp, and serve it:
{{code|
$ yarn
$ yarn build
$ yarn 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!
== Permanently host the webapp ==
If you want to host the webapp on your website, you can build it as follows:
}}
The webapp should now be accessible at your website.
=== Logging in as an admin (or mod) ===
Logging in is very simple. Just join the VM, and double click your username. Enter your admin or mod password into the prompt, and you should be authenticated and able to use staff actions.
== Getting your UserVM on the roster ==