I want to be able to upload some JS Files (Self-Programmed Bots for a game) and then be able to execute the code inside them. Currently the User is required to have the Programm in a certain directory and I take the file from there like this:
this.bot = require('../bots/' + file.name);
Is there a better way to do this that, if possible, also works when the Website is running on a Server (I'm not sure if my current solution would)?