Axios Firebase query

https://stackoverflow.com/questions/49040923/how-to-write-an-axios-query-where-i-dont-know-a-parent-value

https://firebase.google.com/docs/database/rest/retrieve-data

axios.get('/houses.json/' + '?orderBy="houseName"&startAt="A"' + '&auth=' + token)

Test CLI
curl 'https://lirycs-180710.firebaseio.com/list.json?orderBy="$key"&print=pretty'


Proto aby bylo možné řadit také podle jiných sloupců než klíčů - jsou indexovány automaticky - je třeba přidat položku do rules

https://firebase.google.com/docs/database/security/indexing-data

Rules
{
  "rules": {
    ".read": "true",
    ".write": "true",
  "text": {
    ".indexOn": "listId"
  }
  }
}

Test CLI:
curl 'https://lirycs-180710.firebaseio.com/text.json?orderBy="listId"&print=pretty'

Žádné komentáře:

Okomentovat

Server Side Rendering - Next

The Benefits of Server Side Rendering Over Client Side Rendering