google-clone
所属分类:搜索引擎
开发工具:JavaScript
文件大小:168KB
下载次数:0
上传日期:2020-09-11 09:05:53
上 传 者:
sh-1993
说明: Google Clone With React(挂钩+上下文API)和Google自定义搜索JSON API(可编程搜索引擎)
(Google Clone With React ( Hooks + Context API ) and Google Custom Search JSON API ( Programmable Search Engine ))
文件列表:
firebase.json (235, 2020-09-11)
package-lock.json (594446, 2020-09-11)
package.json (813, 2020-09-11)
public (0, 2020-09-11)
public\favicon.ico (3150, 2020-09-11)
public\index.html (453, 2020-09-11)
public\manifest.json (492, 2020-09-11)
public\robots.txt (67, 2020-09-11)
src (0, 2020-09-11)
src\App.js (531, 2020-09-11)
src\components (0, 2020-09-11)
src\components\Home.js (2691, 2020-09-11)
src\components\NotFound.js (519, 2020-09-11)
src\components\Search.js (1308, 2020-09-11)
src\components\SearchPage.js (3003, 2020-09-11)
src\components\keys.js (496, 2020-09-11)
src\components\useGoogleSearch.js (551, 2020-09-11)
src\context (0, 2020-09-11)
src\context\context.js (394, 2020-09-11)
src\context\reducer.js (306, 2020-09-11)
src\index.js (721, 2020-09-11)
src\index.scss (7447, 2020-09-11)
src\serviceWorker.js (5086, 2020-09-11)
# Google Clone With React ( Hooks + Context API ) and Google Custom Search JSON API ( Programmable Search Engine )
#### **Live Project: https://clone-9aeda.web.app/**
## Snapshot
[![google](https://res.cloudinary.com/kirankumargonti/image/upload/v159***02328/GituHub/google_nhtanh.jpg)](https://clone-9aeda.web.app/)
## Quick Start
# Clone the application
$ git clone https://github.com/kirankumargonti/google-clone.git
# Install dependencies
$ npm install
# Serve on localhost:3000
$ npm start
## Project Setup
### 1. Firebase Setup
- [Create a Firebase project ](https://firebase.google.com/docs/web/setup#create-firebase-project)
### 2. Custom Search JSON API ( Programmable Search Engine )
- Get your API KEY ‘
- **https://developers.google.com/custom-search/v1/overview#api_key**
- Enable Custom Search API for your firebase project
- Grab that key and place in **`keys.js`** file which is located in the project
- **`src / keys.js`**
- Create a search engine for your site ‘
- **https://cse.google.co.in/cse/all**
- [Click](https://cse.google.co.in/cse/create/new) add to create
- Enter **`www.google.com`** in the Sites to search Field. and hit the create button.
- Look for the **`Edit search engine`** tab in the left side of the dashboard.
- Choose your created search engine by default it is selected if you don't have more than one.
- Click the setup and the Grab the **`Search engine ID`** place it in the **`keys.js`** file
- Make sure to turn **`On`** the **`Search the entire web`** option
```
Programmatic Access
- Custom Search JSON API
- Limit of 10,000 queries per day.
```
- For more information click [here](https://developers.google.com/custom-search/v1/overview)
### 3. Hosting
# Build for production
$ npm run build
# Install firebase tools
$ npm install -g firebase-tools
# Login to firebase
$ firebase login
# Initialize your firebase project
$ firebase init
# Important Steps
- Use an existing project
- What do you want to use as your public directory?
build
- Configure as a single-page app
(rewrite all urls to /index.html)? Yes
- File build/index.html already exists. Overwrite? No
# Deploy to firebase
$ firebase deploy
## For more information refer firebase docs
https://firebase.google.com/docs
近期下载者:
相关文件:
收藏者: