You are on page 1of 2

4/15/2020 GitHub - prasadKodeInCloud/angular-sample-vod: This is a sample application created on nodejs using angularjs for front end

prasadKodeInCloud / angular-sample-vod

Dismiss
Join GitHub today
GitHub is home to over 40 million developers working together to host
and review code, manage projects, and build software together.

Sign up

This is a sample application created on nodejs using angularjs for front end

36 commits 2 branches 0 packages 0 releases 1 contributor

Branch: master New pull request Find file Clone or download

prasadKodeInCloud Merge branch 'master' of https://github.com/prasadKodeInCloud/angular… … Latest commit ef2ee43 on Mar 25, 2016

public/app clean up code 4 years ago

src clean up code 4 years ago

test config db and test user model 4 years ago

.gitignore added application models structure 4 years ago

Procfile init project 4 years ago

README.md final cut 4 years ago

config.js config db and test user model 4 years ago

index.js save video view activity log 4 years ago

package.json set up node server and create draft application files structure 4 years ago

server.js added api user and activity logs services 4 years ago

README.md

Video on Demand Application


This is a sample nodejs application which allows scrolling a list of videos in a horizontal carousel and play selected videos. Live
demo is available in this link.

##Set-Up Locally
1. Install nodejs (http://nodejs.org/download/)
2. Clone or download the project in to pc.
3. Comment line number 5 and uncomment line number 6 of [client config file] (
https://github.com/prasadKodeInCloud/angular-sample-vod/blob/master/public/app/lib/global/config.js)
4. Run npm install to install all node module dependancies
5. Run node index.js to run the application
6. Application web app will be availabe in http://localhost:3000/

Features
Load a list of videos from a sample api. Note: Image downloaing time is reletively slow in this api.
Alllows to select a video from the view and play in full screen
User can use either mouse or keyboard left, right arrow keys to select a video

https://github.com/prasadKodeInCloud/angular-sample-vod 1/2
4/15/2020 GitHub - prasadKodeInCloud/angular-sample-vod: This is a sample application created on nodejs using angularjs for front end

User can play video by clicking the play button of a video tile or by pressing enter key once seleted a tile.
User will be able to view all the videos watched previously by clicking History icon in header.
User can play videos in history view by clicking on video caption images
Once a video is finished playing, full screen video view will be automatically closed.

##Aplication Architechture

Appication can be basically devided in to two parts as client and server. All the files related with the client side ui rendering of the
app is available in /public/app folder. The business logic and UI flow of the client app is independent from rest of the codes. If
the files and folders in /public/app put in to apache web server, web app should run without any issue.

Nodejs server of the app is built on top of expressjs. Server exposes some restfull web services to save and retrieve data. Both
client and the server codes follow MVC architectture which seperates layers of the system clearly.

##Deployment

Application is deployed in heroku, nodejs hosting environment using continuous deployment feature for github projects.( Each
git push to the master branch is automatically deployed ).

Mongodb sand box free version of [mlab] is used for saving data. Using the folllowing command its possible to connect to the
data base directly.

mongo ds037155.mlab.com:37155/vod -u <dbuser> -p <dbpassword>

##Tracking Users Without User Authentication

This application does not requre user authentication to view video history of users. User detection is done by a unique key
generated based on browser settings and other key finger prints. For this perpose fingerprint2 library is used with default options
to generate key.

##Run Tests

To run the test cases in /test/*.test.js files, please refer to folowing steps

1. Install mocha testing framework globaly by running npm install -g mocha


2. From the root folder of the app run mocha test/{{testfilename}}

Coding Concerns
ES6 coding is not used in the app to prevent risk of deployment issues of app( within 1 week of time).Grunt is not used since its
better to keep the simplicity of app for this level of requirments. Code should be self explanatory in most of the cases.

Prototype inheritance based models structure is created for server to improve code reusability. No angular directives being
created for the ui, concerning the scope of the project.

https://github.com/prasadKodeInCloud/angular-sample-vod 2/2

You might also like