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.
-
Install Homebrew
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" -
Install Ruby
$ brew install ruby -
Install Ruby on Rails
$ gem install rails -
Install PostgreSQL
$ brew install postgresql
-
Clone this repository and
cdinto the directory -
Install dependencies
$ bundle install -
Initiate the database and migrate
$ rails db:create db:migrate
NetaFlicks uses an external API for querying data and will NOT work without the following steps.
-
Obtain a key for The Movie Database API:
-
Create a new
.envfile in the root directory of this project API.$ touch .env -
Add the API keys to your
.envfile by copying the following and replacing the<...>with the correct corresponding key.TMDB_API_KEY= <TMDB API KEY HERE>
-
Remember to add the
.envfile to your.gitignore.
$ rails sThis 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.
