← Back to Home

Week 12 - Node.js MySQL & CRUD

Reference files for the live-coding demos, in teaching order. Open any example and use View Source (right-click → View Page Source) to read the code — then rebuild it yourself.

▶  Open the Interactive Slides

1. MySQL Connection

Setting up database connection in Node.js

2. CRUD Operations

Create, Read, Update, Delete examples

3. Prepared Statements

Secure queries with parameterized statements

4. Express API

Full REST API with MySQL backend

Tip: don't copy-paste. Type the code yourself, break it on purpose, then fix it. Use DevTools (F12) to inspect what's happening.