Giter VIP home page Giter VIP logo

movie-info's Introduction

Getting Movie-Info running locally

Thank you for taking the time to play with my Movie-Info application. Setup is relatively simple. The instructions are long only because I've tried to be explicit and give examples wherever possible.

This setup assumes you already have node.js and npm installed on your system. You can find instructions for installation at nodejs.org and npmjs.com.

TLDR

  1. Clone the repo.
  2. Go to root directory and enter: npm install
  3. Get version 3 api_key from developers.themoviedb.org/3/getting-started/introduction
  4. From project root directory, go to server directory: cd ./server
  5. Enter the following: export TMDB_API_KEY={your version 3 api_key from themoviedb.org}
  6. Go back to project root directory and enter: export PORT={your desired port number}
  7. Start the server by entering the following: npm run server-dev
  8. Open a new tab in your browser with the following URI: http://localhost:{your desired port number}/
  9. Explore different movies and movie title searches.

Clone the application locally

In a terminal on your system clone the repo and go to the root directory of the repo

Install the node modules

In the root directory of the project, enter the following:

        npm install

Next...Get a version 3 api_key from The Movie Database API

In your browser, go to
        developers.themoviedb.org/3/getting-started/introduction

Follow the instructions to open an account (it should be free) and get an api_key. Please note that this repo uses Version 3 of the The Movie Database API. The key will be a string of about 32 characters. Once the api_key is acquired go to the project root directory and navigate to the server directory.

What do I do with this api_key?

From the project root directory enter the following commands:

        $ cd ./server
        $ export TMDB_API_KEY={your themoviedb.org api_key}

For example: if your api_key='1234567890abcdefghij123456789012', you would do the following:

        $ cd ./server
        $ export TMDB_API_KEY='1234567890abcdefghij123456789012'

Now the server can access and utilize the api at https://api.themoviedb.org

Next: Set the environment variable PORT to your desired port number.

        $ export PORT={your desired port number}

Example: If the desired port to run your server on is 3333, enter the following in ./server directory
        $ export PORT="3333"

Run the server

In the root directory of the project, enter the following:

        $ npm run server-dev

Then...

Open a new tab in your browser with the following URI:

        http://localhost:{your desired port number}/

In this above case, {your desired port number} should be replaced with the value assigned to PORT
So, if {PORT}= 3333, you should set your browser address to
        http://localhost:3333/

And finally...

Click on a movie title to see details ...or...

Enter a title, or part of a title in the search bar ...or...

Click on a different page number and view other pages of the popular movies or search results.

Enjoy.

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.