Giter VIP home page Giter VIP logo

filmclub's Introduction

FilmClub

Goal

The goal of this application is to compare the different server side and front end frameworks/languages/libraries/tools.

How it works

The way the app is developed:

git flow feature start <feature name> #We do this first thing when developing a new feature, this will create a new branch
git add . #Add the files when we want to do a local commit
git commit -m "message add [branch ch<storyNumber from clubhouse.io>]" #This will commit the ticket locally and will associate it with the clubhouse ticket
git push #When we are ready for it to go to repository
git flow feature finish <feature name> #When we are done with a feature we merge it back into development
git flow feature publish <feature name> #Commit development to GitHub

When we want to go to heroku (When we're happy with a feature - either part way through or finished)

git subtree push --prefix <folder name> <git remote URL tag> master #This pushes a subtree (so just a sub-folder <folder_name>, not the whole repo as this contains multiple apps, to the master branch of the heroku remote URL tag)

Heroku knows how to start each application because each folder contains a procfile. The procfile details how to start the application

The stories for this project can be found at here.

Back-End

FilmClub.Java.Dropwizard

This is the API for the application written in Java using Dropwizard. It defines a clean RESTful interface and is used by the front end. It is designed to be generic but this is due to the application not being overly complex.

Because it isn't complex there is no need for an application service.

The configuration for this app can be found here.
The application can be found here here.
An example call can be found here.
A swagger page still needs to be added.

In order to push this application and deploy it to heroku you can run the push-dropwizard.bat file which is in the root of the project. This runs git subtree push --prefix FilmClub.Java.Dropwizard heroku-java-dropwizard master where heroku-java-dropwizard = https://git.heroku.com/filmclub-java-dropwizard.git and master is the only branch in the heroku repo.

The procfile for this application starts the jar by doing the following:
web: java $JAVA_OPTS -Ddw.server.applicationConnectors[0].port=$PORT -jar target/filmclub.java.dropwizard-1.0-SNAPSHOT.jar server config.yaml $PORT is a pre-populated env var by heroku which we use to tell dropwizard what port to run on.

Front-End

FilmClub.FrontEnd.Angular

This is the Angular front end for the application using Angular 1.6. Heroku does not support the hosting of just static files so in order to host this angular application we have a lightweight node server which just returns the index page no matter what you resource you ask for: res.sendfile('./build/index.html');

The configuration for this app can be found here.
The app can be found here.

In order to push this application and deploy it to heroku you can run the push-angular1.bat file which is in the root of the project. This runs: git subtree push --prefix FIlmClub.FrontEnd.Angular heroku-frontend-angular-1 master where
heroku-frontend-angular-1 = https://git.heroku.com/filmclub-frontend-angular-1.git and master is the only branch in the heroku repo.

The procfile for this application runs the npm task start by doing the following:
web: npm start, where start runs node server which runs server.js which starts the node server. Heroku also runs the npm task postinstall which runs gulp build after heroku does its build. This is so the index.html file is built. The two tasks can be found in the package.json file:

...
"scripts": {
    "start": "node server",
    "postinstall": "gulp build"
},
...

To Start Locally

Run npm start and it will be deployed on port 8080

Design Decisions

Couldn't get protractor working :(

filmclub's People

Contributors

zinbo avatar

Watchers

James Cloos 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.