The Tour Guide App is a web application designed to help users explore and discover landmarks, towns, cities, and countries. It provides a user-friendly interface to search for places, view details, and pin favorite locations.
- Search: Search for landmarks, towns, cities, and countries.
- Pin Favorites: Pin favorite places to a sidebar for quick access.
- Toggle Pins: Toggle pins on and off for each location.
The server logic is implemented in app.js
. The server uses Express.js to handle HTTP requests and responses. It interacts with the Wikivoyage API to fetch data about places. The server handles:
- Home Route: Renders the main page with a search form.
- Search Route: Handles POST requests from the search form, fetches search results from the Wikivoyage API, and renders the main page with the search results.
- Wiki Route: Fetches detailed content for a specific page title from the Wikivoyage API and renders the main page with the detailed content.
The server also uses Cheerio to parse HTML content fetched from the Wikivoyage API and extract relevant information such as images, paragraphs, landmarks, embassies, and airlines.
- Node.js: JavaScript runtime environment.
- Express.js: Web application framework for Node.js.
- Cheerio: Fast, flexible, and lean implementation of core jQuery designed specifically for the server.
- Pug: Template engine for rendering HTML.
- CSS: Styling the web pages.
- JavaScript: Client-side scripting for interactivity.
-
Clone the repository:
git clone https://github.com/yourusername/tour-guide-app.git
-
Install dependencies:
npm install cd server npm install
-
Start the server:
npm start
- Open your browser and navigate to
http://localhost:5500
. - Use the search bar to find places.
- Pin your favorite places by clicking the pin icon next to each location.
Contributions are welcome! Please read the contributing guidelines before getting started.
This project is licensed under the MIT License. See the LICENSE file for details.