-
Clone project locally
-
Install dependencies
npm install
# or
yarn install
# or
pnpm install
- Start server locally
npm run serve
# or
yarn serve
# or
pnpm serve
- Start frontend locally
npm run dev
# or
yarn dev
# or
pnpm dev
This api uses json-server, see official documentation to learn more about it: https://github.com/typicode/json-server
method: GET
route: http://localhost:3001/notifications
method: GET
route: http://localhost:3001/notifications?seen=false
- Use
_page
and optionally_limit
to paginate returned data.
method: GET
route: http://localhost:3001/notifications?_page={pageNumber}&_limit={limit}
- Add
_sort
and_order
(ascending order by default)
method: GET
route: http://localhost:3001/notifications?_sort={sortParam}&_order={asc | desc}
method: PATCH
route: http://localhost:3001/notifications/{id}
method: PUT
route: http://localhost:3001/notifications
method: POST
body: {
{
body: string,
user?: string
},
}
route: http://localhost:3001/notifications
Headers:
-
In the
Link
header you'll getfirst
,prev
,next
andlast
links. -
X-Total
header (total notifications count) andX-Unseen
(total unseen notifications count) header are also included.