Coder Social home page Coder Social logo

whithang / moviepublic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raidersofthelostapp/moviepublic

0.0 2.0 0.0 4.47 MB

Search and recommendation engine for movies with upcoming release notifications based on user preferences

JavaScript 85.50% SQLPL 0.88% HTML 12.42% CSS 1.19%

moviepublic's Introduction

Project Name

The project description

Team

Roadmap

View the project roadmap [https://docs.google.com/document/d/1G0QEuFhXAR2H6vbSgyYonfQ1UkbpUq5ephmo5YCSVgc/edit?usp=sharing]

Contributing

See [CONTRIBUTING.md]for contribution guidelines.

Table of Contents

  1. Usage
  2. Requirements
  3. Development
    1. Installing Dependencies
    2. Install Project Dependencies
    3. App Configuration
  4. Database Initialization
    1. User Setup
    2. Creation
    3. Migration & Data Seeding
  5. Running the App

Usage

Some usage instructions

Requirements

  • Node 6.9.x
  • Redis 3.2.x
  • Postgresql 9.6.x
  • etc

Development

Installing System Dependencies

brew install yarn
brew install redis
brew install postgresql

Yarn is a replacement for npm. It's faster and guarantees consistency -- as you deploy your code in various environments, you won't run the risk of slight variations in what gets installed.

-- output from redis install below -- To have launchd start redis now and restart at login: brew services start redis Or, if you don't want/need a background service you can just run: redis-server /usr/local/etc/redis.conf

-- output from postgresql install below -- To have launched start postgresql now and restart at login: brew services start postgresql Or, if you don't want/need a background service you can just run: pg_ctl -D /usr/local/var/postgres start

Install Project Dependencies

yarn global add grunt-cli knex eslint
yarn install

App Configuration

Override settings config/default.json in any environment by making a copy of config/ENV.example.json and naming it config/ENV.json and setting the appropriate variable.

For environments that require use of environment variables, you can supply variables as defined in config/custom-environment-variables.json.

See https://www.npmjs.com/package/config And https://github.com/lorenwest/node-config/wiki/Environment-Variables#custom-environment-variables

If you are using Atom and don't see these new files, follow instructions here: http://blog.lukebennett.com/2015/09/21/show-hidden-files-in-atom-sidebar/

If you have any CRLF and LF errors due to a mix between Mac and Windows contributors, run git config core.autocrlf false

Database Initialization

IMPORTANT: ensure postgres is running before performing these steps with below command:

brew services start postgresql

See DB_DOCUMENTATION.md for more explanation of the DB setup

Database User Setup

##Postgres

  1. Open the postgresql command prompt with psql postgres
  2. Create a project specific user with this command: create role raiders with login password 'theLostApp' createdb;
  3. This user / password is the same as found in the config/default.json file
  4. Confirm user was created with this command: \du
  5. Exit the prompt with \q

Other helpful postgres command lines: \l - list databases \c <database> - connect to a database \dt - list tables in a connected database \d <table> - list columns on a table

##MongoDB

  1. run from a command shell to start the db mongod
  2. some helpful mongo command lines: mongo - start the command shell use fetcher - to switch to our project db there is only one collection - movies db.movies.find() - to see the content of the movies db

Database Creation:

Use grunt to create a new database for your development and test environments:

Development environment: grunt pgcreatedb:default

Other environments, specify like so: NODE_ENV=test grunt pgcreatedb:default

Test environment: NODE_ENV=test grunt pgcreatedb:default Production environment: NODE_ENV=production grunt pgcreatedb:default

Run Migrations & Data Seeds

In terminal, from the root directory:

To migrate to the latest version, run: sh knex migrate:latest --env NODE_ENV

To rollback a version, run:

knex migrate:rollback --env NODE_ENV

To create a new migration after altering schema, run:

knex migrate:make [migration name]

Use a descriptive migration name.

To populate the database with seed data, run:

knex seed:run --env NODE_ENV

Note: --env NODE_ENV may be omitted for development. For example, knex migrate:latest will run all migrations in the development environment, while knex migrate:latest --env test will migrate in the test environment.

Running the App

To run webpack build: yarn run build

To run server: yarn run start

To run tests: yarn run test

To run your redis server for the session store redis-server

Deploy to heroku

Your master will auto deploy so if you want to deploy from your branch, follow this command:

git push heroku <nameofbranch>:master

Install Heroku Addons for Heroku Postgres, Heroku Redis, and mLab MongoDB

Heroku Postgres - populate the schema by following instructions for Import https://devcenter.heroku.com/articles/heroku-postgres-import-export You can use DropBox to host the saved dump Original schema load: https://www.dropbox.com/s/ke8bwdlo9dwzjkj/thesis_devel.dump?dl=0 also saved in thesis_devel.dump

Heroku Redis - promote the redis store to the app heroku redis:promote <redisStoreName -a <appName>

Update Heroku Config variables and change all callback urls to match the stage

moviepublic's People

Contributors

andrewhyeon-jahnelgroup avatar artliou avatar jmaxc6 avatar whithang avatar

Watchers

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