{"repo":"willbuckingham/node-rest-mysql","free":true,"listed":false,"github":"https://github.com/willbuckingham/node-rest-mysql","clone":"git clone https://github.com/willbuckingham/node-rest-mysql.git","description":"This is a boilerplate for using Node.js with Express to host a RESTful API for a MySQL/MariaDB Database.","language":"JavaScript","stars":24,"topics":["mysql","boilerplate","nodejs","rest-api"],"license":"GPL-3.0","category":"databases-storage","readme_excerpt":"node-rest-mysql A secure Node.js REST API boilerplate using Express and MySQL. Updated for 2025. Features - ES Modules (ESM) - MySQL2 with connection pooling and promise-based API - Parameterized queries (SQL injection prevention) - Input validation and sanitization (express-validator) - Security headers (Helmet) - CORS with whitelisted origins - Rate limiting - Environment-based configuration Requirements - Node.js 18.11+ (for --watch support) - MySQL or MariaDB Installation 1. Clone and install dependencies: 2. Create a .env file from the example: 3. Configure your database credentials in .env : 4. Set up your database with a panos table. See the included SQL file for reference. Usage Development (with hot reload): Production : API Endpoints Method Endpoint Description ------ --------------------- -------------------- GET /api/panoramas Get all panoramas GET /api/panoramas/:id Get panorama by ID POST /api/panoramas Create new panorama PUT /api/panoramas/:id Update panorama DELETE /api/panoramas/:id Delete panorama Project Structure Security - Parameterized queries prevent SQL injection - Helmet sets secure HTTP headers - CORS restricts allowed origins - Rate limiting prevents abuse (100 req/15min) - Input validation sanitizes all user input - Error messages hide stack traces in production Future Improvements - Add route list generation at /api/ - Support filtering, limiting, and sorting results - Add panorama categories (routes and architecture) - Add authentication (JWT or","default_branch":null,"files":null,"tree":[],"storefront":"/r/willbuckingham","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/willbuckingham/node-rest-mysql/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}