https://github.com/sahilatahar/api-playground
API Playground is a backend project. It offers three routes: /user, /quote, and /joke, each capable of returning dummy JSON data.
https://github.com/sahilatahar/api-playground
expressjs javascript nodejs nodejs-api
Last synced: about 2 months ago
JSON representation
API Playground is a backend project. It offers three routes: /user, /quote, and /joke, each capable of returning dummy JSON data.
- Host: GitHub
- URL: https://github.com/sahilatahar/api-playground
- Owner: sahilatahar
- Created: 2023-12-13T10:15:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-14T05:21:00.000Z (over 2 years ago)
- Last Synced: 2025-10-24T18:45:45.653Z (7 months ago)
- Topics: expressjs, javascript, nodejs, nodejs-api
- Language: JavaScript
- Homepage:
- Size: 134 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API Playground
## Description
API Playground is a backend project developed for practice purposes while learning backend development. It offers three routes: `/user`, `/quote`, and `/joke`, each capable of returning dummy JSON data. These routes support a `count` query parameter to specify the number of data items to retrieve.
## Routes
### `/user`
- **Description:** Returns dummy user data.
- **Example Usage:** `https://dummy-api-playground.vercel.app/user?count=5`
- **Response:** Returns 5 sets of dummy user data.
### `/quote`
- **Description:** Returns dummy quotes.
- **Example Usage:** `https://dummy-api-playground.vercel.app/quote?count=3`
- **Response:** Returns 3 sets of dummy quotes.
### `/joke`
- **Description:** Returns dummy jokes.
- **Example Usage:** `https://dummy-api-playground.vercel.app/joke?count=10`
- **Response:** Returns 10 sets of dummy jokes.
## Technologies Used
- Node.js
- Express.js
## How to Use
1. Clone the repository: `git clone https://github.com/sahilatahar/api-playground.git`
2. Install dependencies: `npm install`
3. Run the server: `npm start`
4. Access the routes using appropriate endpoints and query parameters as described above.
## Project Structure
```
api-playground/
├─ controllers
│ ├── jokeController.js
│ ├── quoteController.js
│ └── userController.js
├─ data
│ ├── joke.json
│ └── quote.json
├─ routes/
│ ├── user.js # User route handling
│ ├── quote.js # Quote route handling
│ └── joke.js # Joke route handling
├─ services
│ ├── joke.js
│ ├── quote.js
│ └── user.js
├─ utils
│ └── getNumber.js
└─ index.js # Entry point
```
## Contributing
Contributions are welcome! Feel free to fork the repository and create a pull request with your improvements or suggestions.
## License
This project is licensed under the [MIT License](LICENSE).