It seems like the problem is the JS files not being in the public
folder. Express limits available files to a specified folder, so that no one can access your server.js
through the browser and potentially exploit vulnerabilities in your code. Put your p5.*
files into the public
folder and it should work.