The easy way to watch videos with your friends.
This project targets node 14 and up.
- Clone this repo.
git clone https://github.com/dyc3/opentogethertube.git
- Install redis
Ubuntu
sudo apt install redis
- Install dependencies.
npm install -g yarn
yarn
- Copy and fill out the configuration file
cp env/example.env env/production.env
Please read the config docs here for which options are required.
- Build Vue files so they can be served statically.
yarn run build
- Run database migrations
NODE_ENV=production-sqlite yarn workspace ott-server run sequelize-cli db:migrate
- Run the server.
NODE_ENV=production yarn start
You can also specify the port the server will listen on by setting the
PORT
environment variable.
PORT=8080 NODE_ENV=production yarn start
See the Docker README
Contributions are welcome! Check out issues that have the "good first issue" label.
This project targets node 14 and up.
- Fork this repo and clone it.
- In a terminal, navigate to the
opentogethertube
folder and run
npm install -g yarn
yarn
- Next you need to set up your configuration. Start by copying the example
config in the
env
folder to a new file calleddevelopment.env
cp env/example.env env/development.env
- Create a new project on Google Cloud
- Add "YouTube Data API v3" and "Google Drive API" to the project
- Obtain a YouTube API key
- Obtain a Google Drive API key
- Not necessary if you don't plan to stream videos from Google Drive, which you probably shouldn't do anyway because Google doesn't like that.
- Open
env/development.env
and replaceAPI_KEY_GOES_HERE
with the appropriate api key. - Initialize your local database.
yarn workspace ott-server run sequelize-cli db:migrate
- Install redis. This is used to store room state and user sessions across server restarts.
To run the test suite, run
yarn test
This project has 2 main components: the client and the server. You can run both of them simultaneously using the command
yarn run dev
yarn run dev-windows
Sometimes, you may want to run them seperately so you can use breakpoints to debug. Using VSCode, this is trivial.
To start the server: Debug > Select "Launch Program" > Start
To start the client: yarn workspace ott-client serve