Public
Like
hotelsList
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
This directory contains the backend API for the Hotel Finder application.
index.ts- Main entry point for the HTTP APIservices/hotelService.ts- Service for fetching hotel data
Fetches hotels by zip code.
Query Parameters:
zipCode(required) - The zip code to search for hotels
Response:
{ "hotels": [ { "id": "string", "name": "string", "address": "string", "zipCode": "string", "city": "string", "state": "string", "rating": 4.5, "amenities": ["string"], "imageUrl": "string", "weeklyPrice": 700, "nightlyPrice": 120 } ], "totalResults": 5, "zipCode": "10001" }
- The current implementation uses mock data. In a production environment, this would be replaced with calls to a real hotel API.
- Hotels are sorted by weekly price (lowest to highest).