Node.js: Upload CSV file data to Database

A CSV (comma-separated values) file is a plain text file that contains data which format is described in RFC4180. In this tutorial, I will show you how to upload/import CSV file data into MySQL Database using Node.js Express & fast-csv.

Related Posts:
Upload/store images in MySQL using Node.js, Express & Multer
How to upload/store images in MongoDB using Node.js, Express & Multer
Import CSV data into PostgreSQL using Node.js
Import CSV file into MongoDB collection using Node.js

Excel file instead: Node.js: Upload/Import Excel file data into Database

Read More

Import CSV file into MongoDB collection using Node.js

Today we’re gonna show you way to use Node.js to import CSV file into a MongoDB Database collection with two steps:

Related Post: Export MongoDB collection to CSV file using Node.js

More Practice:
Node.js, Express & MongoDb: Build a CRUD Rest Api example
Node.js + MongoDB: User Authentication & Authorization with JWT

Read More

Export PostgreSQL data to CSV file using Node.js

Previous tutorial shows you how to use Node.js to import CSV data into a PostgreSQL Database table. Today we’re gonna do the opposite: Export PostgreSQL data to CSV file. There are 2 steps:

  • Read PostgreSQL data using pg module
  • Export PostgreSQL data to CSV file using one of three modules: fast-csv, csv-writer or fs

Rest API: Node.js Download CSV file example
Dockerize: Docker Compose Nodejs and Postgres example

Read More

Import CSV data into PostgreSQL using Node.js

In this tutorial, we’re gonna import CSV data into PostgreSQL Database table using Node.js. There are 2 steps:

  • Reading CSV file with fs & fast-csv module
  • Connecting to PostgreSQL Database to save CSV data with pg module

Related Post: Export PostgreSQL data to CSV file using Node.js
Rest API: Node.js: Upload CSV file data into Database with Express
Dockerize: Docker Compose Nodejs and Postgres example

Read More