It’s through Node JS using child_process. Therefore executes a shell command through the web. Here’s the full code below:

const { exec } = require("child_process");

exec("start fivem://connect/SERVER_IP/", (error, stdout, stderr) => {
    if (error) {
        console.log(`error: ${error.message}`);
        return;
    }
    if (stderr) {
        console.log(`stderr: ${stderr}`);
        return;
    }
    console.log(`stdout: ${stdout}`);
});

EDIT:
Documentation found here: Executing Shell Commands with Node.js