This is a simple API built with Deno that provides information about vehicles based on their manufacturing year.
-
GET /api/motorcycles/{year}
Retrieves information about motorcycles manufactured in the specified year.
Example:
/api/motorcycles/2022
Response:
{ "make": "DUCATI", "models": [ "1098S", "1199", "500 PANTAH", "M900", "M900/900 S", "MH900E", "MTS 620", "SUPER SPORT", "SUPER SPORT 1000 DS" ] }
To run the API, make sure you have Deno installed on your machine. Then, follow these steps:
- Clone the repository:
git clone https://github.com/surdle/vehicles-api.git
- Navigate to the project directory:
cd vehicles-api
- Run the API:
deno run --allow-net main.ts
The API will start running on http://localhost:8000
.