An open API service indexing awesome lists of open source software.

https://github.com/fitri-hy/blogs-api-backend

Basic Node JS project to create an API Endpoint for a Blog
https://github.com/fitri-hy/blogs-api-backend

api blog endpoint json

Last synced: 7 months ago
JSON representation

Basic Node JS project to create an API Endpoint for a Blog

Awesome Lists containing this project

README

          

# BLOGS API NODE JS
Basic Node JS project to create an API Endpoint for a Blog

## INSTALATION
```
git clone https://github.com/fitri-hy/blogs-api.git
cd blogs-api
npm install
```

## RUN PROJECT
```
node .
```
or
```
node index.js
```

## API ENDPOINT ACCESS

#### List Data:
`/api/data`
example
`http://localhost:3000/api/data`

#### Pagnition Pages
`/data?page={value}`
example
`http://localhost:3000/api/data?page=2`

#### Search Data by Title
`/api/data/search?query={query}`
example
`http://localhost:3000/api/data/search?query=express`

#### Filter Data by Category
`/api/data/category?query={category}`
example
`http://localhost:3000/api/data/category?query=html`

#### Data Detail
`/api/data/{id} example`
example
`http://localhost:3000/api/data/3`

Support me by giving stars