/sonic-node

Primary LanguageJavaScript

Sonic - NodeJS

How to run

Setup application

pnpm dev

Setup Sonic

pnpm sonic:up # or docker compose -f sonic/docker-compose up

API Routes

See file api.http

GET /

GET http://localhost:3000
accept: application/json

Response:

{
  hello: "world";
}

POST /

POST http://localhost:3000
content-Type: application/json

{
  "title": "Minhas tarefas",
  "content": "Fazer café"
}

GET /search

GET http://localhost:3000/search?q=café
content-Type: application/json

Response:

{
  results: ["post:<id_post>"];
}

GET /suggest

GET http://localhost:3000/suggest?s=caf
content-Type: application/json

Response:

{
  results: ["café"];
}