Track issues on github here
git clone git@github.com:nicholasgriffen/react-gbooks
cd react-gbooks
npm install
- Define
./src/server/.env
(see example)
Required:
API_ENDPOINT
API_KEY (how to get one)
Optional:
PORT npm run client-build
npm start
heroku create my-app
heroku config:set API_ENDPOINT=https://www.googleapis.com/books/v1/volumes
heroku config:set API_KEY=your_secret_key #substitute your Google Books API key
git push heroku master
See "scripts": "client-build"
and "scripts": "heroku-postbuild"
in package.json for implementation details.
See Heroku for heroku CLI usage.
React application bootstrapped with create-react-app
See ./src/client/contributing.md for more specific overview of file structure
Designed to be served from src/server/public
Presents and renders a search bar
Sends user input as request to src/server/books/
Receives data as response from src/server/books
Presents search results
#39. Client was created with, then ejected from create-react-app
transform src/client and copy it to the src/server/public folder
see build.sh for implementation details
run jest in watch mode
Node.js web server written with Express
See ./src/server/contributing.md for more specific overview of file structure
Serves public/index.html
Should, but does not have to, serve the results of npm run client-build
from ./public/
Initiates a search of Google Books API in response to an http GET to /books with optional query param, /books?search=param
#31. Server tests fail without a valid API key
start the server and listen for requests on a port
print the port to the console
run mocha in watch mode