The Travel App project is a web application that allows users to plan their trips by providing information about the destination such as weather, images, and other relevant data.
- Search for a destination city and country.
- Retrieve and display images of the destination.
- Fetch and show the current weather of the destination.
- Provide additional information about the country like population, capital, and more.
- Node.js
- Express
- Fetch API
- Geonames API
- Weatherbit API
- Pixabay API
- REST Countries API
Ensure you have the following installed on your local machine:
- Node.js & npm
- Other requisites are described in the package.json file
1 Clone the Repository
git clone https://github.com/ehernandezvilla/travel-app.git
cd travel app
npm install
2 Setup Environment Variables
Create a .env file in the root directory and add the following with your respective API keys:
PIXABAY_API=[Your Pixabay API Key]
WEATHERBIT_API=[Your Weatherbit API Key]
GEONAMES_USERNAME=[Your Geonames Username]
3 Start the Server
npm start
The server will start running on http://localhost:8081.
4 Visit the Application
Open your browser and visit http://localhost:8081.
Tests are written using Jest. To run the tests, you can run the following command:
npm test
For a live demo of the application go to https://travel-app-1c31.onrender.com
GET /all
- Description: Get a welcome message.
- Response: A welcome message string.
POST /getGeonames
- Description: Get information about the destination.
- Request Body:
- destination: String (format: "city, country")
- Response: JSON object containing information about the destination.
If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.
MIT
- Geonames
- Weatherbit
- Pixabay
- REST Countries