Error: Cannot POST /includes/

I’m using Node.js to help build a web app and am trying to create a login form + signup form but when submitting the form i get the following error: Cannot POST /includes/ . I’m new to php and MySQLi and thus are following this tutorial: and have a db running with phpmyadmin (not too sure whether it could be an issue with accessing that as i never came accross an option to set usernames or passwords for the db). The issue might also be to do with the routing on routes.js. Here’s my code for the affected areas:



$conn = mysqli_connect($serverName, $dBUsername, $dBPassword, $dBName);

if (!$conn) {
    die("Connection failed: " . mysqli_connect_error());


if (isset($_POST["submit"])) {
    echo "It works!";
else {
    header("location: ../views/index.ejs");


<!DOCTYPE html>
    <script src="" crossorigin="anonymous"></script>
    <link rel="preconnect" href="">
    <link rel="preconnect" href="" crossorigin>
    <link href="" rel="stylesheet">
    .center {
      margin: auto;
      width: 50%;
      padding: 10px;
    .button {
      border: none;
      color: white;
      padding: 10px 40px;
      text-align: center;
      text-decoration: none;
      display: inline-block;
      font-size: 16px;
      margin: 4px 2px;
      transition-duration: 0.4s;
      cursor: pointer;
    .button1 {
      background-color: white;
      color: black;
      border: 2px solid #4da9ff;
    .button1:hover {
      border-radius: 10px;  
      background-color: #4da9ff;
      color: white;

<section class="signup-form">
    <h1>Create Account</h1>
    <form action="../../includes/" method="post" style="margin: auto; width: 250px;">
        <i class="fa-solid fa-user"></i><input type="text" name="uid" size="25" placeholder="Create A Username"/><br>
        <i class="fa-solid fa-lock"></i><input type="password" name="pwd" size="25" placeholder="Create A Password"/><br>
        <i class="fa-solid fa-lock"></i><input type="password" name="pwdrepeat" size="25" placeholder="Repeat Password"/><br>
        <i class="fa-solid fa-envelope"></i><input type="text" name="email" size="25" placeholder="Your Email"/><br>
        <i class="fa-solid fa-tag"></i><input type="text" name="name" size="25" placeholder="Full Name"/><br>
        <button class="button button1" type="submit" name="submit">Sign Up</button>


var express = require("express");

var router = express.Router();

router.get("/", function(req, res){
    console.log("A1 Cabs!? A1 Cabs!? Testing Testing 123!")

router.get("/cards", function(req, res){

router.get("/login", function(req, res){

router.get("/createacc", function(req, res){

router.get("/projectpage", function(req, res){

module.exports = router;

Thank you any help would be appreciated. 🙂