Everything is in one repo to keep things together. Change into each subdirectory before starting each part.
Note: I have never built a project that used mongodb/nodejs before, so chances are I'm not following best practices...
The server is responsible for getting data into the database from reddit and to serve up the website and API.
The following system requirements are assumed to be installed.
- Node.js 0.10+
- MongoDB 2.6+
- Run
npm install
in theserver
directory - Run
mkdir data
in theserver
directory
- In one console, run
mongod --dbpath data
- In another, run
./bin/www
- Go to
localhost:3000
in your browser
- You may need to refresh the main page on the web a few times before there are videos in the DB (see comments in code).
The Android application uses the REST API from the server project. Make sure the server is running before you try to use the Android application.
- Download Android Studion
- Import the project using Android Studion
- Determine the public IP of the server, and modify
android/app/build.gradle
and make sure theAPI_HOST
value points to your server and is accessible by the device - Run the application