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
19 lines
338 B
JSON
19 lines
338 B
JSON
{
|
|
"name": "api-crud-demo",
|
|
"version": "1.0.0",
|
|
"description": "",
|
|
"main": "server.js",
|
|
"scripts": {
|
|
"start": "node server.js",
|
|
"db:push": "node scripts/init-db.js"
|
|
},
|
|
"keywords": [],
|
|
"author": "",
|
|
"license": "ISC",
|
|
"type": "commonjs",
|
|
"dependencies": {
|
|
"express": "^5.2.1",
|
|
"mysql2": "^3.24.4"
|
|
}
|
|
}
|