Skip to content

CSV4Tasks is a Node.js (ESM) application that provides a simple CRUD API for managing tasks, plus bulk import from CSV files using streams and the csv-parse library.

Notifications You must be signed in to change notification settings

Vitinho163/CSV4Tasks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSV4Tasks


English

CSV4Tasks is a Node.js (ESM) application that provides a simple CRUD API for managing tasks, plus bulk import from CSV files using streams and the csv-parse library.

Summary

🚀 Technologies Used

  • Node.js v20.17.0
  • csv-parse: CSV parsing library for Node.js streams

📁 Project Structure

├───/docs
│       Node.js-Ignite-_2025-05-13.json
├───/src
│   ├───database.js
│   ├───routes.js
│   ├───server.js
│   ├───/middlewares
│   │       json.js
│   └───/utils
│           build-route-path.js
│           extract-query-params.js
└───/streams
        csv.js
        test.csv

🛠️ Installation

  1. Clone the repository
  git clone https://github.com/Vitinho163/CSV4Tasks.git
  cd CSV4Tasks
  1. Install dependencies
  npm install
  1. Start the API server
  npm run dev

The server will listen on http://localhost:3333.

🔄 Usage

Bulk CSV Import

  1. Make sure the API is running (npm run dev).

  2. Place your CSV file (with header title,description) into the streams/ folder.

  3. From project root, run:

  node streams/csv.js <your-file.csv>
  1. Each line in the CSV will be sent as a POST /tasks to the api.

  2. When processing finishes, you’ll see:

  CSV Importado!

Created with ❤️ by João Victor

--

Português

CSV4Tasks é uma aplicação Node.js (ESM) que expõe uma API CRUD de tarefas e suporta importação em massa via CSV, utilizando streams e a biblioteca csv-parse.

Sumário

🚀 Tecnologias Utilizadas

  • Node.js v20.17.0
  • csv-parse: CSV parsing library for Node.js streams

📁 Estrutura do Projeto

├───/docs
│       Node.js-Ignite-_2025-05-13.json
├───/src
│   ├───database.js
│   ├───routes.js
│   ├───server.js
│   ├───/middlewares
│   │       json.js
│   └───/utils
│           build-route-path.js
│           extract-query-params.js
└───/streams
        csv.js
        test.csv

🛠️ Instalação

  1. Clone o repositório
  git clone https://github.com/Vitinho163/CSV4Tasks.git
  cd CSV4Tasks
  1. Instale as dependências
  npm install
  1. Inicie o servidor
  npm run dev

O servidor ficará disponível em http://localhost:3333.

Uso

Importação em Massa via CSV

  1. Garanta que a API esteja rodando (npm run dev).

  2. Cole seu arquivo CSV (com cabeçalho title,description)na pasta streams/.

  3. Execute no terminal, na raiz do projeto:

  node streams/csv.js <your-file.csv>
  1. Cada linha será enviada como POST /tasks para a API.

  2. Ao final do processamento, verá:

  CSV Importado!

Criado com ❤️ por João Victor

About

CSV4Tasks is a Node.js (ESM) application that provides a simple CRUD API for managing tasks, plus bulk import from CSV files using streams and the csv-parse library.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published