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.
- 0forms
- 0API routes
- 0byte salt
- 100plain-text passwords
Log in
Welcome back,
How it works
-
01
Form → JSON
The browser checks the fields, then sends them to the API with
fetch. -
02
Salt + scrypt
Express hashes the password with Node's built-in
crypto.scryptand a random salt. -
03
MySQL
Only the hash goes into the
userstable. Queries use placeholders, so no SQL injection.
// POST /api/register
{ "name": "Alex Doe", "email": "alex@example.com", "password": "••••••••" }
// → 201 Created { "name": "Alex Doe" }