为什么我会收到405错误?

I'm very new to web programming, and I'm trying to set up a little website with a serverside. Here's the code:

class userData {
  catchDropDownSelection() {
    this.dropDownSelection = $('#xDropDown').prop('selectedIndex');
  }
}

class sendData {
  constructor(userData) {
    this.userDataClone = userData;
  }

  sendDropDownSelection() {
    //this.userDataClone.catchDropDownSelection();
    $.post("MyFirstPhP.php", {
      userSelection: "dummy" //this.userDataClone.dropDownSelection
    }, function(data) {
      //this.testFunction()
      $('#testOutput').html("data");
      //document.getElementById("testOutput").innerHTML = "data"
    }).fail(function() {
      console.log("$.post failed!");
    })
  }

  testFunction() {
    //document.getElementById("testOutput").innerHTML = "data"
    $('#testOutput').html("data");
  }
}

var userDataInstance = new userData;
var sendDataInstance = new sendData(userDataInstance);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!DOCTYPE html>
<html>

<head>
  <title>PHP is Awesome!</title>
  <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script>
  <link rel="stylesheet" type="text/css" href="MyFirstPhP.css">
</head>

<body>
  <select id="xDropDown">
    <option value="test1">test1</option>
    <option value="test2">test2</option>
  </select>
  <button onclick="sendDataInstance.sendDropDownSelection()">ClickMe!</button>
  <p id="testOutput">not yet</p>
  <script src="MyFirstPhP.js"></script>
</body>

</html>

The php code is here:

<?php
  session_start();
  $dropDownSelection = $_POST['userSelection'];
  echo $dropDownSelection
  //$dropDownSelection = $dropDownSelection . "wurde verarbeitet!";
?>

I'm running my server with node.js on localhost, port 8080. So far it works, when I've started the server I can load my page and interact with it. However, when I'm pressing the button, which triggers the AJAX call to the php, I'm getting the following error in my console log:

jquery-3.3.1.min.js:2 POST http://localhost:8080/MyFirstPhP.php 405 (Method Not Allowed)

I must add that I'm running the whole thing without admin privileges. However, since the webserver somehow seems to run as I can load the website, I wonder if it could be due to another reason than low privileges on the machine.

</div>