Very simple page that works well on local Wappler server but the scores query gets a 500 error on remote server. I have debug enabled so that maybe someone can decipher the error message.
It’s just a very simple api that returns one record. Should show the scores and assign the values to the form inputs as well.
In the NodeJS section of your cPanel, do you find any information regarding a “virtual environment”? There should be a command you have to run first
Or, you can find npm’s binary here:
/opt/cpanel/ea-nodejs**/bin/
But the ** need to be replaced with the NodeJS version. It’s better if you cd /opt/cpanel and then type ls to list the folders, and there you find the NodeJS version and cd into it. But you can’t run install mysql here in this directory, you need to go your project’s directory, and call the npm binary from there using the full path of it
Or an easier solution is just to manually modify package.json to add “mysql” - check how’s on your local computer (you could even copy the entire file). And then click the button to install NPM modules
It should, but isn’t, otherwise Knex would be working
Copy from local to remote
Wappler tries to optimize package.json to remove packages that are unused. Somehow, Wappler think MySQL isn’t needed on the remote, that’s the explanation to your problem, the reason why this happens needs to be explained by George or Teodor