Add Student Management mini system

Express + MySQL CRUD API for student records, with a plain HTML frontend.

- Single-file backend (server.js) with 5 CRUD routes
- Proper HTTP status codes and a consistent error envelope
- 8-digit ids: 2-digit year + per-year 6-digit counter (e.g. 26000001),
  allocated under a MySQL advisory lock so concurrent inserts cannot collide
- student_db.sql schema and seed data
- .env for credentials; only .env.example is committed
This commit is contained in:
2026-09-28 18:58:42 +08:00
parent 36ef7f0122
commit 45e4de3557
8 changed files with 1783 additions and 2 deletions
+6
View File
@@ -0,0 +1,6 @@
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_password_here
DB_NAME=student_db
PORT=3000