Minimal, open-source version of TK Sync
You will need to:
- Install the following:
- Create a database in MySQL (e.g.
tandem
) - Add this to your
hosts
file:127.0.0.1 dev.tandem.io
- Configure a YouTube App
- Configure a SoundCloud App
- Set the following
ENV
variables:# Secrets export TANDEM_TOKEN_SECRET="YOUR-TOKEN-SECRET-HERE" export TANDEM_SESSION_SECRET="YOUR-SESSION-SECRET-HERE" # DB URLs export TANDEM_MYSQL_URL="YOUR-MYSQL-URL-HERE" (mysql2://user:password@host:port/database) export TANDEM_REDIS_URL="YOUR-REDIS-URL-HERE" (redis://user:password@host:port) # SoundCloud export TANDEM_SOUNDCLOUD_APP_ID="YOUR-SOUNDCLOUD-APP-ID-HERE" export TANDEM_SOUNDCLOUD_APP_SECRET="YOUR-SOUNDCLOUD-APP-SECRET-HERE" # YouTube export TANDEM_YOUTUBE_APP_ID="YOUR-YOUTUBE-APP-ID-HERE" export TANDEM_YOUTUBE_APP_SECRET="YOUR-YOUTUBE-APP-SECRET-HERE" export TANDEM_YOUTUBE_API_KEY="YOUR-YOUTUBE-API-KEY-HERE"
- Run
npm install
to install all of the node.js dependencies.
Once you've done all of the above, you can start your development server by running: npm run watch
. This will build Tandem, watch files for changes, run the server. While this is running you should be able to access the application at http://dev.tandem.io:8080.
NOTE: If these instructions are out of date, try stumbling through YouTube's app instructions.
Before you can create an app, you'll need a Google Account. Sign up now if you don't already have one.
- Go to the Google Developers Console
- You will see a blue Create project button in the top left corner of the page body.
- Name your project something like
tandem-io-dev
and click Create. Once the project is ready you'll be redirected to the Project Dashboard. - Now you'll need to enable the YouTube Data API on this project. Click the blue Enable API button at the top of this page.
- Next, you'll need to create a server key for your app. Call your key something like
Tandem.io Dev Key
, skip the IP address field, and click Create. - The dev console will show your key in a modal dialog. Copy and paste it into the appropriate environment variable.
- Finally, you'll need to set up an OAuth Client ID for the project. When you visit this page you'll see a warning stating that you must set your product's name. Click the blue Configure consent screen button.
- Name your project something like
Tandem.io Dev
and click save. This will take you back to the OAuth Client screen. - Select the "Web application" radio.
- Name your client name (e.g.
Tandem.io Dev
) - Set Authorize JavaScript Origins to
http://dev.tandem.io:8080
- Set Authorized redirect URIs
http://dev.tandem.io:8080/auth/google/callback
- Name your client name (e.g.
- Click the blue Save button.
- The dev console will show you your client ID and secret in a modal dialog. Copy those to the appropriate environment variables.
That's it! Next time you launch Tandem you will be able to make YouTube API requests.
NOTE: If these instructions are out of date, you can try stumbling through the SoundCloud app instructions.
Before you can create an app, you'll need a SoundCloud account. Sign up now if you don't already have one.
- Go to the SoundCloud app registration page.
- Name your app something like
Tandem.io Dev
, agree to the Dev Policies, and click Register. - Next, set the app's website as
http://dev.tandem.io:8080
and the Redirect URI tohttp://dev.tandem.io:8080/auth/soundcloud/callback
. - Copy the Client ID and Client Secret into the appropriate environment variables.
- Click Save app.
That's it! Next time you launch Tandem you will be able to make SoundCloud API requests.