How To Make A Simple Login And Sign Up System!

How To Make A Simple Login And Sign Up System!

So ages ago I wanted to make a working login and sign up system, but had no idea where to start! So I looked for some tutorials, but there were no really direct ones, only ones saying that it is really complicated! But here I am going to tech you directly how to make a simple login and sign up system which is stores on a webserver!

Starting up our server!

So for the server create a new Node.js server. No lets install some Node.js extensions for our server so it is ready to recieve requests!

In this code we have installed everything we will need to actually get the server up and running!

Receiving and responding to requests!

So now we need to setup our code to be able to listen for certain URLs and respond to them with he correct information!

The code we have just put in will now add and check login details from a replit database! Now all we have to do is get a personal HTTP for our server, which is simply done by adding this to the bottom of your code:

And click run and wait for the packages to install (It can take a few minutes) and then you should now have a web page saying "Server"!

Making requests from your project

This next bit of code would be done from a HTML, CSS and JS repl which would be separate to your node.ha server!

To communicate from the server you can use fetch requests, for example to check a users name and password the you would do:

and as for adding an account you pretty much do the same thing:

Find any errors in this?

If you have found any errors or are unsure of anything comment down below and I will be with you as soon as I can!

Remember to upvote if you like!!

Hope you have fun with this simple login and sign up tutorial!

You are viewing a single comment. View All

@ThatGhost I use bcrypt to hash the passwords: