This application is an imitation of the Google Search Console. Users can search 'turtle', 'tiger' or 'koala' in the console to get 10 relevant results.
- Console filters out non-letter characters e.g. 'turtle', 'TURTLE', 'TU24r!&l78e' will all retrieve the same results.
- If the console is empty, and you click 'Get Lucky', it will retrieve a random result. Else, it will retrieve a random result that is relevant to the query.
- If your search doesn't match any search query, an alert is displayed instructing you to search for either 'turtle', 'tiger' or 'koala'.
We used HTML to structure the application and CSS to style it.
JavaScript was used in the client folder to fetch data from the API. It was used to create a REST API with get
routes for various queries. This allowed the application to:
- fetch all results,
- fetch a specific result,
- fetch a random result,
- and fetch a random result that is relevant to the query in the console.
- Clone or download this repository.
- Open your terminal.
- Make sure you are in the
lap1-code-challenge
directory. - Install the node modules with
npm install
.
- Run
npm run dev
to launch the server. - Access the backend.
- All results.
- http://localhost:3000/google followed by a number between 1 and 30 gives you a specific result e.g. 7th google search result.
- A random result.
- A random 'turtle' result.
- A random 'tiger' result.
- A random 'koala' result.
- Navigate to the client folder, right-click
index.html
and selectGo Live
.