npm installnpm start/POST login/
The default port is 3001, so, to be able to run this you should use http://localhost:3001/login
// Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/
$ch = curl_init();
$username = 'YOUR IDUFFS should be here';
$password = 'Your password should be here';
curl_setopt($ch, CURLOPT_URL, 'http://localhost:3001/login');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "username={$$username}&password={$password}");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
//Result should be a json file
$result = json_decode($result);
// Your code goes here