Skip to content

Dhon23/google-search-api-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Google search API react

make search engine with google search api
Google search API >>

View Demo

About The Project

product-screenshot

This is a search engine project using google search API and Reactjs. This website has features such as searching for pictures and news. in the news section you can save it into bookmarks and also remove it from bookmarks

Built With

  • React

Getting Started

Development

  • Install all dependencies
npm install
  • Start app
npm run start

Testing

  • use JSON server to speed up fetching data

    • Install json server
    npm i -g json-server
    • run JSON server
    json-server --watch db_result.json --port 3001
    • in src/pages/ResultPage.js command this
    return axios.get(
      `https://google-search3.p.rapidapi.com/api/v1/${type}/q=${keyword}`,
      {
        headers: {
          "X-User-Agent": "desktop",
          "X-Proxy-Location": "EU",
          "X-RapidAPI-Key": "xxxxxxxxxxxxxxxxxxxxxxxx",
          "X-RapidAPI-Host": "google-search3.p.rapidapi.com",
        },
      }
    );
    • and in src/pages/ResultPage.js uncommand this
    return axios.get("http://localhost:3001/" + type);
  • run test

npm run test
  • run test with coverage
npm run coverage
  • this is the last coverage I get with JSON server db_results.json

test-coverage

Production

  • build app
npm run build

and I have deployed this to firebase. demo link

Contact

Email - m.ramadhan.ak@gmail.com

Project Link: https://github.com/Dhon23/google-search-api-react

Project Demo Link: https://search-api-project-85e76.web.app

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published