21shield / NetaFlicks-backend

api for movies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

title

NetaFlicks Backend API

NetaFlicks is a movie web application that allows users to search and vote on movies.

This is the Rails Backend API for NetaFlicks.

You can access the NetaFlicks Frontend here.

Prerequisites

  1. Install Homebrew

    $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  2. Install Ruby

    $ brew install ruby
  3. Install Ruby on Rails

    $ gem install rails
  4. Install PostgreSQL

    $ brew install postgresql

Getting Started

  1. Clone this repository and cd into the directory

  2. Install dependencies

    $ bundle install
  3. Initiate the database and migrate

    $ rails db:create db:migrate

Initial Configuration

NetaFlicks uses an external API for querying data and will NOT work without the following steps.

  1. Obtain a key for The Movie Database API:

  2. Create a new .env file in the root directory of this project API.

    $ touch .env
  3. Add the API keys to your .env file by copying the following and replacing the <...> with the correct corresponding key.

    TMDB_API_KEY= <TMDB API KEY HERE>
  4. Remember to add the .env file to your .gitignore.

Starting the Server

$ rails s

This will start the server on port 3000 which can be accessed at http://localhost:3000.

If you want to use a different port, make sure you change the src/utilities/constants.js file in the Frontend to fetch from the right port.

About

api for movies


Languages

Language:Ruby 99.3%Language:HTML 0.7%