How poomsaks/excel-to-db works
This is a small Express application for importing spreadsheet rows into a MySQL database. A user opens the served page, submits an Excel file to the upload endpoint, and the route stores the file, parses its first worksheet, and inserts each row into the lowcarb table. The app also initializes the database pool and serves the static view. The source excerpts establish these main relationships; the page's submission behavior is not shown, so no client-to-endpoint edge is asserted.
Main entry points: routes.js Upload route · app.js Express server · db.js MySQL pool · index.html Upload page
Components 8
Web entry
- Express server
app.js - Upload page
view/index.html
Spreadsheet import
- Upload route
routes.js - Stored spreadsheet
uploads - Workbook parser
routes.js
Persistence
- MySQL pool
db.js - MySQL database
Other components
- User
Connections 6
- Express server → Upload page: serves
app.js - Express server → Upload route: mounts routes
app.js - Upload route → Stored spreadsheet: stores upload
routes.js - Upload route → Workbook parser: reads workbook
routes.js - Upload route → MySQL pool: inserts rows
routes.js - MySQL pool → MySQL database: queries
db.js