https://github.com/shaaanuu/solar-system-api
Some solar system planets and its things....
https://github.com/shaaanuu/solar-system-api
api planets solar-system vercel
Last synced: 3 months ago
JSON representation
Some solar system planets and its things....
- Host: GitHub
- URL: https://github.com/shaaanuu/solar-system-api
- Owner: shaaanuu
- Created: 2024-11-15T10:50:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-15T11:27:43.000Z (over 1 year ago)
- Last Synced: 2025-09-05T11:57:44.734Z (10 months ago)
- Topics: api, planets, solar-system, vercel
- Language: JavaScript
- Homepage: https://solarsystem-api.vercel.app/api/planets
- Size: 688 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node Hosting Testing 🚀
This is a simple Node.js project that serves as an API to provide information about planets 🌍 in our solar system. The API is hosted and deployed using [Vercel](https://vercel.com). 🌐
## API Endpoints 🛸
### `GET /api/planets` 🌌
Returns a list of all planets in our solar system with detailed information.
#### Example Response:
```json
[
{
"id": 1,
"name": "Mercury",
"type": "Rocky",
"diameter": 4879,
"distanceFromSun": 57910000,
"moons": 0,
"description": "The smallest planet in our solar system, closest to the Sun. ☀️"
},
]
```
### `GET /api/planets/:id` 🌠
Returns information about a specific planet by its ID.
#### Example Response (for `GET /api/planets/1`):
```json
{
"id": 1,
"name": "Mercury",
"type": "Rocky",
"diameter": 4879,
"distanceFromSun": 57910000,
"moons": 0,
"description": "The smallest planet in our solar system, closest to the Sun. ☀️"
}
```
#### Error Response (if planet is not found):
```json
{
"message": "Planet not found 😞"
}
```
## Setup and Installation 🛠️
To run this project locally:
1. Clone the repository:
```bash
git clone https://github.com/shaaanuu/node-hosting-test.git
```
2. Navigate to the project directory:
```bash
cd node-hosting-testing
```
3. Install dependencies:
```bash
npm install
```
4. Start the local server:
```bash
node api/index.js
```
The app will run on `http://localhost:3000`. 🌍
## Deployment 🚀
This project is deployed on [Vercel](https://vercel.com). Every time you push code to the repository, Vercel automatically redeploys the project with the latest changes.
## License 📄
This project is open-source and available under the [MIT License](LICENSE).