I have two questions I am struggling to find an answer too.
My first question Is if I can fetch the logs from 2 different projects, and have them shown on a webpage on one project on my websites admin page.
My second question Is if I can get a sh file running while using a package.json which starts my project on a javascript file, I want to do this so I can use javascript in some circumstances, and still have a sh file enabling apache to be able to use .htaccess files as well!
Thank’s for your reply, I am going to try get the second question fixed first, and I have tried doing what you suggested, but it is not working correctly, I may have done something wrong, but I am not sure, and it does not seem to be loading the sh file, and for some reason, it does not seem to want to load my webpages and says it cannot find them anymore.
My project name is catmaniabot, if any staff member could try taking a look!
EDIT: I am loging the errors, and get the following
Seems strange… Could you send a snapshot of your code that you used to spawn/load the sh file. Maybe you need to specify the full path of the file. e.g `bash ${__dirname}/begin.sh`
Hey @Callum-OKane I think your problem is that you’re using execFile incorrectly. That method takes an executable file and executes it, but instead you’re sending it a command. You may have better luck if you switch to exec.
Also, the contents of the start script in package.json are interpreted as bash commands and you can put any valid command there. For instance you could use something like bash /app/begin.sh && node start.js and the commands would work fine.
However, I’m not sure exactly what you’re expecting to accomplish, but I think you’re going to run into problems with this configuration. It looks like you’re trying to start both a Node process running your start.js file and the Apache2 configuration set up in .apache2. Those are both going to try to listen to the same port (and Glitch only opens one) and you’re going to end up with a port conflict.
Hey Cori,
I have not gotten any problem with port conflicting after trying this, but Can you just check that this page does ask you for login before entering the page! https://catmaniabot.glitch.me/page/adminPage