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: 3 months ago
JSON representation
Basic Node JS project to create an API Endpoint for a Blog
- Host: GitHub
- URL: https://github.com/fitri-hy/blogs-api-backend
- Owner: fitri-hy
- License: mit
- Created: 2024-04-20T11:41:38.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-12T02:59:51.000Z (about 2 years ago)
- Last Synced: 2025-03-13T05:44:27.524Z (over 1 year ago)
- Topics: api, blog, endpoint, json
- Language: EJS
- Homepage:
- Size: 43.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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