Skip to content

Commit

Permalink
Create custom CORS proxy for YouTube fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
EricTendian committed Jul 30, 2024
1 parent 5c19759 commit bf7aa5d
Show file tree
Hide file tree
Showing 15 changed files with 3,082 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/declarations/

# dependencies
/node_modules/
node_modules/

# misc
/.env*
Expand Down
2 changes: 1 addition & 1 deletion app/routes/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class AudioRoute extends Route {
model.streams = await response.json();

try {
const ytResponse = await fetch('https://corsproxy.io/?' + encodeURIComponent('https://www.youtube.com/@EricTendian/live'));
const ytResponse = await fetch('https://worker.erictendian.workers.dev/youtubelive/');
const ytResponseData = await ytResponse.text();

const parser = new DOMParser();
Expand Down
15 changes: 0 additions & 15 deletions build_scripts/build.sh

This file was deleted.

7 changes: 0 additions & 7 deletions build_scripts/setup.sh

This file was deleted.

4 changes: 0 additions & 4 deletions build_scripts/test.sh

This file was deleted.

2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
command = "ember build"

[build.environment]
NODE_VERSION = "18"
NODE_VERSION = "20"
RUBY_VERSION = "2.7.6"

# Production context: All deploys from the Production branch set in your site's deploy settings will inherit these settings.
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions worker/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# http://editorconfig.org
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_style = space
6 changes: 6 additions & 0 deletions worker/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 140,
"singleQuote": true,
"semi": true,
"useTabs": true
}
Loading

0 comments on commit bf7aa5d

Please sign in to comment.