node-register-login
Checking server…

Node.js · Express · MySQL

Register & log in

One page, two forms and a small Express API. Passwords are salted and hashed before they touch the database. On GitHub Pages it runs in demo mode and keeps everything in your browser.

01

Create an account

Use 8+ characters. Mix letters, numbers and symbols.

02

Log in

How it works

  1. 01

    Form → JSON

    The browser checks the fields, then sends them to the API with fetch.

  2. 02

    Salt + scrypt

    Express hashes the password with Node's built-in crypto.scrypt and a random salt.

  3. 03

    MySQL

    Only the hash goes into the users table. Queries use placeholders, so no SQL injection.

// POST /api/register
{ "name": "Alex Doe", "email": "alex@example.com", "password": "••••••••" }
// → 201 Created  { "name": "Alex Doe" }