User login / registration for electron app

Hi I have built a user registration / login site using node.js express and mysql

using this tutorial Basic Login System with Node.js, Express, and MySQL

is it possible to create an electron desktop app using my current code - I want to be able to use the mysql database for my data back-end for the app and if possible add an admin area where I can manage users.

or is there another method I could use, without using a third party service.

1 Like

Ok so I have managed to get the app to load, do I need to change the / to ./ in my code for it to work in electron, should I move my app.js to my views folder?

<!DOCTYPE html>
		<meta charset="utf-8">
		<link rel="stylesheet" href="../static/style.css">
		<link rel="stylesheet" href="">
		<script src=""></script>
		<script src="../script.js"></script>
		<div class="login">
			<div class="links">
				<a href="./index.html" class="active">Login</a>
				<a href="./register.html">Register</a>
			<form class="ajax-form" action="./" method="post">
				<label for="username">
					<i class="fas fa-user"></i>
				<input type="text" name="username" placeholder="Username" id="username" required>
				<label for="password">
					<i class="fas fa-lock"></i>
				<input type="password" name="password" placeholder="Password" id="password" required>
				<label id="rememberme">
					<input type="checkbox" name="rememberme">Remember me
				<div class="msg">{{ msg }}</div>
				<input type="submit" value="Login">

This is not working as expected I think its because I am trying to use an ajay-form function

$(document).ready(function() {

    if ($(".ajax-form").length) {

        $(".ajax-form").submit(function(event) {

            var form = $(this);

            var url = form.attr('action');


                type: "POST",

                url: url,

                data: form.serialize(),

                success: function(data) {

                    if (data == "Success") {

                        window.location.href = "home";

                    } else {









this is the console error I get