A webapp where people watch videos together and chat with friends
Webapp Url: http://cs56-f18-watch-with-friends.herokuapp.com/
Before running, please have a database in MLab ready with the credentials:
mongodb://<username>:<userpassword>@ds<host>.mlab.com:<port>/<databasename>
Instructions (LOCALHOST): Clone this repository then update the credentials inside of localhost.json.SAMPLE with:
{
"spring.data.mongodb.database":"<databasename>",
"spring.data.mongodb.host":"ds<host>.mlab.com",
"spring.data.mongodb.password":"<userpassword>",
"spring.data.mongodb.port":"<port>",
"spring.data.mongodb.username":"<username>"
}
Afterwards, the commands to run are :
-
mv localhost.json.SAMPLE localhost.json
-
. env.sh
-
mvn compile
-
mvn spring-boot:run
- NOTES:
- if the
java.net.ConnectException: Connection refused (Connection refused)
error occurs, use command:. env.sh
to rebuild environment file then usemvn spring-boot:run
- if an issue with the
8080
port occurs, please edit theserver.port
property inside~/src/main/resources/application.properties
to change the port to8181
Instructions (HEROKUAPP): Clone this repository then navigate to application.properties to update credentials:
Pathway: ~/src/main/resources/application.properties
server.port = 8080
server.contextPath = /api
spring.data.mongodb.database=<databasename>
spring.data.mongodb.host=ds<host>.mlab.com
spring.data.mongodb.password=<userpassword>
spring.data.mongodb.port=<port>
spring.data.mongodb.username=<username>
Afterwards, navigate back the top level directory. The commands to run are:
-
mvn compile
-
mvn package heroku:deploy
Optional Heroku Commands:
-
heroku config:set MONGOLAB_URI=mongodb://<username>:<userpassword>@ds<host>.mlab.com:<port>/<databasename> --app cs56-f18-watch-with-friends
-
heroku config:get MONGOLAB_URI --app cs56-f18-watch-with-friends
Technical things to know: Learn how the @ResponseBody works, and how to use the MongoRepository.
Holistic things to know: Work with your team, keep each other in check, attempt to understand the project as a group, and prepare time to overcome technical challenges.
Bugs Features: When first creating a room on the webapp, the error page is called. However, subsequent creations of rooms will permanently work.
Features to add: Realtime-chat, Music sharing options, User accounts (personalization), Improved security, Syncing of videos, and a way to monitor current sessions.
What we used for this app:
Spring-Boot
Herokuapp
MongoDB with MLab
Maven
The app is meant to create new or join existing rooms created by the app. Each room is uniquely identified by a name and hash. Existing room names cannot be created, but there is no way at the moment to stop users from simply entering the room that they guessed -- This could be a new issue to attempt. The code is divided into two parts: the User Interface (resources files) and Database (predominantly the java files). The way the two are connected is through the WatchController, which delivers response bodies to the html as well as makes calls to the database. Once you gain understanding of this process, continuing the app will be the next step. Good luck.