Jump to content

Discord bot hosting with Noda.js


dam

Recommended Posts

I'm currently trying to host a discord bot (written with discord.js). I followed this guide but I kept getting phusion passenger errors like the one in the screenshot (the error id is always different).

I tried both using the bot main file as the file to execute and also creating a webserver (with express first and node http next) that would then call client.login(token) to start the bot.

 

Sidenote: at first the main file name was index.js but i then changed it to app.js to be sure that wasn't a problem but it still happened, so i was wondering if it's actually a problem not to main the main file index.js as that's what i'm used to call my main files.

 

account name: dam

main domain: dam.heliohost.us

server: tommy

 

post-204933-0-78457100-1616498493_thumb.png

  • Like 1
Link to comment
Share on other sites

I will also be going down this path, or python. Will let you know if I find anything.

 

https://www.helionet.org/index/topic/40834-is-it-possible-to-run-a-nodejs-script-continuously-without-having-an-active-browser-tab-open/

 

might be a fix.

I tried following what was suggested on that post, all I got was 500 server errors when i try to start the python script, i'm not sure if it has something to do with how my folder structure is though

Link to comment
Share on other sites

I am currently running into a 500 error as well. Will let you know if I find something.

 

Tried adding the /usr/bin/node

and the shell=True

and changing the if 'node'.encode('utf-8') in line:

 

doesn't seem to work still getting Internal Error 500. I imagine we are probably doing the same thing wrong.

Edited by gleason
Link to comment
Share on other sites

So I ended up getting mine to work.

In username/node do you have app.js packages.json and node_modules folder?

 

You added node to application manager?

 

And you have start.py and stop.py in cgi-bin folder?

I did some kind of customisation, like the folder in which i saved the bot's files because i was planning on having more than one, so i can't say for sure, but i'm confident everything is as it should.

Only thing is the file is not called app.js from when i tried to use the python scripts it looked like you could use any name you wanted as long as the paths were correct in the scripts, and it doesn't look like the guides are related to each other

Link to comment
Share on other sites

I'm now trying to mark the applications as "development" in application manager since i noticed i didn't do that previously, i doubt that's the cause but who knows

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...