{"action":"opened","issue":{"url":"https://api.github.com/repos/demaisj/soundcloud-rp/issues/15","repository_url":"https://api.github.com/repos/demaisj/soundcloud-rp","labels_url":"https://api.github.com/repos/demaisj/soundcloud-rp/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/demaisj/soundcloud-rp/issues/15/comments","events_url":"https://api.github.com/repos/demaisj/soundcloud-rp/issues/15/events","html_url":"https://github.com/demaisj/soundcloud-rp/issues/15","id":364175808,"node_id":"MDU6SXNzdWUzNjQxNzU4MDg=","number":15,"title":"Setting up soundcloud-rp as a Windows service and automatically run it on the background","user":{"login":"TotomInc","id":9285210,"node_id":"MDQ6VXNlcjkyODUyMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/9285210?v=4","gravatar_id":"","url":"https://api.github.com/users/TotomInc","html_url":"https://github.com/TotomInc","followers_url":"https://api.github.com/users/TotomInc/followers","following_url":"https://api.github.com/users/TotomInc/following{/other_user}","gists_url":"https://api.github.com/users/TotomInc/gists{/gist_id}","starred_url":"https://api.github.com/users/TotomInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TotomInc/subscriptions","organizations_url":"https://api.github.com/users/TotomInc/orgs","repos_url":"https://api.github.com/users/TotomInc/repos","events_url":"https://api.github.com/users/TotomInc/events{/privacy}","received_events_url":"https://api.github.com/users/TotomInc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-26T19:28:03Z","updated_at":"2018-09-26T19:28:03Z","closed_at":null,"author_association":"NONE","body":"This is not really an issue, but a small guide that I hope @demaisj will add in the README, about how to setup soundcloud-rp as a Windows service and automatically run the soudcnloud-rp server as a service (and so a background process).\r\n\r\n1. Install `node-windows` globally: `npm install -g node-windows`\r\n2. Symlink `node-windows` into your project root: `npm link node-windows` inside your project.\r\n3. Create a `service.js` file which contains:\r\n\r\n```javascript\r\nvar Service = require('node-windows').Service;\r\n\r\nvar svc = new Service({\r\n  name: 'Soundcloud to Discord-RP',\r\n  description: 'Get a Soundcloud integration in Discord-RP.',\r\n  script: 'C:\\\\path\\\\to\\\\bin\\\\soundcloud-rp-binary',\r\n  nodeOptions: ['--harmony', '--max_old_space_size=4096']\r\n});\r\n\r\nsvc.on('install',function(){\r\n  svc.start();\r\n});\r\n\r\nsvc.install();\r\n```\r\n\r\n4. In the `service.js`, make sure to edit the `script` path to match **YOUR** soundcloud-rp location. You can retrieve the path by going into **the folder explorer**, getting into your `soundcloud-rp\\bin` then **right-click** `soundcloud-rp` (yes, the one without extension which is a file), click on **properties** then copy the **path** value. Make sure to double the `\\` and add `soundcloud-rp` at the end of the path.\r\n\r\nThe final path result should look like `C:\\\\Users\\\\TotomInc\\\\Github\\\\soundcloud-rp\\\\bin\\\\soundcloud-rp`.\r\n\r\n5. Once the script is done, you need to start a terminal where your `soundcloud-rp` folder is and run: `node service.js`. This will create a new Windows service, running the `soundcloud-rp` server.\r\n\r\n6. You can verify the service have been added by checking the `services.msc`, to do it press `windows key + R` and type `services.msc`. You should find a service with name `Soundcloud to Discord-RP`. You can edit the service properties and disable it, remove it or even stop running it at startup."}}
{"actor":{"display_login":"TotomInc"}}