Giter Site home page Giter Site logo

book_search's Introduction

Book Search

This app is deployed on Heroku!

Book Search uses the Google Books API to find volumes which match a given search query.

Currently, the search functionality returns a list of books.

Each item in this list includes an image, title, author(s), publisher, and a link to learn more about the volume.

Contributing

To interact with this project locally, clone the repo and make sure you have the lastest version of Node installed.

Install dependencies with npm install

Run the server with node server.js

Now you can view the site on localhost:3000!

Pull requests, new issues, and feature requests are all welcome.

My approach to building this app

  • I started by exploring the Google Books API and testing out calls in Postman

  • Once I understood what data to expect from the JSON response I created a function with vanilla JS

  • I started working with index.html in VS Code's live server to create a view with some basic styling

  • I connected my getBooks() function to the view using a script tag

  • I then installed Express and hit a snag-- my server worked, but the search script wasn't running from the view

  • I wondered if there was a way to push to Heroku without setting up a server and quickly learned this isn't possible

  • I reverted to Express and EJS, researching and troubleshooting client side scripting

  • I researched this issue and found that I needed to serve the script as a static file in server.js

  • After adding app.use(express.static(path.join(__dirname, 'client'))) I was back to the same functionality on localhost:3000 that I had in VS Code's live server

  • I reorganized my file tree and deployed to Heroku.

Next steps

  • Improve styling with Bootstrap or similar library

  • Research how to test client-side API calls and write tests

  • Improve how the API call handles missing "Publisher" data

book_search's People

Contributors

jamisonordway avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.