Git Product home page Git Product logo

moviereactapp's Introduction

IMDB React/Express App

Simple React/Express app that show data from an IMDb dataset that is stored in NoSQL Mongo collections. Express is used to create a RESTful API to return the information in those collections for React to display.

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

What things you need to install the software and how to install them

  • React, React Scripts & React Dom:
  npm install --save react react-scripts react-dom
  • Express:
  npm install --save express
  npm install nodemon

Installing & Set Up

1. Insert Data into Mongo Collections

To do this you will need to naviate in a terminal to your mongodb/bin directory is. Once here type the following commands:

mongod --dirpathperdb --dbpath {your_path}\mongodb\data\db --logpath {your_path}\mongodb\log\mongo.log --logappend --rest --install
net start MongoDB
mongo

This should set your log and data path, then set MongoDB to start running in the background finally open up the mongo terminal. In the mongo terminal type the following commands:

use movieinfo
db.createCollection('movie');
db.createCollection('actor');

Finally you will need to copy the contents of (MovieReactApp/movie-app/format_data/actor_table.json) and (MovieReactApp/movie-app/format_data/movie_table.json) into the appropriate collections in mongo. Like so:

db.movie.insert( {pasted movie_table.json} );
db.actor.insert( {pasted actor_table.json} );

This may take a minute because the JSON files are very large

2. Running the Project

Since this project uses both Express and React on different Ports you will to open two terminals to run each. The first terminal you will navigate to the rest-api directory and type the following command:

nodemon

This will start the express server on port 3001. To check that the information is getting fetched successfully open a web browser and look up

localhost:3001/api/movies
localhost:3001/api/actors

Both should return the data from Mongo in JSON format. The second terminal you will need to naviate to the movie-app directory and run the command

npm start

This will start the React app on port 3000. To check if this worked type into a web browser

localhost:3000

This should display the web application

Authors

Jeffrey Noehren

moviereactapp's People

Contributors

jeffnoehren avatar

Watchers

Jeffrey Noehren avatar

moviereactapp's Issues

Things to Fix

1. Use the React LifeCycle
2. Break MovieApp into smaller components
3. Create Automated tests

Component Hierarchy

  • Movie App
    • Sort Table
      • Sort Categories
      • Search Bar
    • Data Table
      • Header
      • Names
      • Navigation

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.