Git Product home page Git Product logo

mern-book-library's Introduction

MERN Book Search

This Application uses MongoDB, Express, React, & Node

MERN Book Search is a React-based Google Books Search application. It allows you to search the Google Books API for books that you might like to read; displaying for you the book information including an image of the book, title, authors, description, published date, and number of pages. Furthermore you are then able to save the book to your 'Bookshelf' to reference later. You are also provided with a link to the book on Google's site. The server for the application is supported by Node.js and Express and a MongoDB database is used to store your 'Bookshelf' which is queried via Mongoose.

Main

Home Search

Home Search

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

In order to install and run MERN-Library on your own device you will need to be able to run MongoDB, in addition to needing the following npm packages:

Node.js
Express.js
Mongoose
Axios

Installing

You will need to do the following steps after cloning the repo to your device in order to ensure that it works properly.

To ensure Node.js is running within the package and configure all modules for use:

npm install

This should install all the requisite modules for the server and then cd into the client folder to install all the modules required there. following this installation check to make sure that you have a node_modules folder in both the root directory and within the 'client' folder and things should be ready to run.

For the Server:
express             
axios               
if-env              
mongoose            
concurrently        

For the React App:
axios               
prop-types          
react               
react-alert         
react-alert-template-basic
react-dom       
react-router-dom    
react-scripts
            

Running 'MERN Book Search'

To run MERN Book Search locally you will need to have MongoDB running on your computer, you can then begin the server simply by path into the root folder for the application and running:

npm start

As per the package.json... with it being in dev mode (which is checks for), it will run nodemon --ignore 'client/*' (Starting the server and ignoring the contents of the client folder, which houses the React Application) concurrently with running npm run client = cd client && npm run startwhich grabs the client folder and starts the React Application running on proxy port 3001. If all runs smoothly you should see another browser tab open and navigate to the site.

Deployment

I personally have this application deployed using Heroku, with mLab serving serving as the remote MongoDB database. The steps to deploy in this manner are as follows:

Initialize your own copy of the project as a Git Repo if you have not already done so using:

git init

Create a heroku app on the heroku website, this is where you will be pushing the project to for deployment. Then add the mLab Addon for the MongoDB Database.

Add and commit your changes on your own device before pushing to Heroku (the first command will be provided for you by Heroku):

heroku git:remote -v <name of your heroku application>

Then:

git push heroku master

Heroku automatically sets the NODE_ENV to Production and will thus run the build commands within the package.json. Additionally, in order to be able to utilize the Google Books API, you will have to provide your Heroku Application with your API key for the site. This can be done in your application settings on Heroku.

Built With

Authors

Acknowledgments

  • Many thanks to my instructors & TAs

mern-book-library's People

Contributors

rebecalvarez 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.