Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

schivei/tmanager

Repository files navigation

tmanager

Node.js Tests

Prepare

Install dependencies

npm i

if on linux, make tmanager executable

chmod +x tmanager

on windows with powershell

.\tmanager

Configure Firebase Admin

Alter the file firebase-admin.json with your firebase admin credentials.

Run tests

npm test

CLI commands

Inserts

Inline

tmanager -i '[{\"description\":\"Criar Login\",\"responsable\":\"bruno\",\"status\":\"done\"}, {\"description\":\"Criar Menu\",\"responsable\":\"bruno\",\"status\":\"doing\"}, {\"description\":\"Criar tela de perfil\",\"responsable\":\"bruno\",\"status\":\"todo\"}]'

or

tmanager --insert '[{\"description\":\"Criar Login\",\"responsable\":\"bruno\",\"status\":\"done\"}, {\"description\":\"Criar Menu\",\"responsable\":\"bruno\",\"status\":\"doing\"}, {\"description\":\"Criar tela de perfil\",\"responsable\":\"bruno\",\"status\":\"todo\"}]'

File

tmanager -f /path/to/file.json

or

tmanager --file /path/to/file.json

List

tmanager -s

or

tmanager --select

To filter data, use --filter option with -s or --select option

tmanager -s --filter status=done

Clear

tmanager -c

or

tmanager --clear

Web Daemon

tmanager -d

or

tmanager --daemon

API

Inserts

curl -X POST \
  http://localhost:3000/insert-tasks \
  -H 'Content-Type: application/json' \
  -d '[{"description":"Criar Login","responsable":"bruno","status":"done"}, {"description":"Criar Menu","responsable":"bruno","status":"doing"}, {"description":"Criar tela de perfil","responsable":"bruno","status":"todo"}]'

List

curl -X GET \
  http://localhost:3000/get-tasks \
  -H 'Content-Type: application/json'

About

tmanager interview test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages