-
Notifications
You must be signed in to change notification settings - Fork 575
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
534 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
echo "Code BeforeInstall event script ran." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
echo "Code ApplicationStart event script ran." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
echo "Code ValidateService event script ran." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ src/scripts | |
.vscode | ||
yarn.lock | ||
test.ts | ||
dist | ||
dist | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
language: node_js | ||
node_js: | ||
- "12.5.0" | ||
- 13 | ||
- 14 | ||
- 15 | ||
- 16 | ||
- 17 | ||
script: | ||
- npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: yarn build && node dist/main.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ Consumet scrapes data from various websites and provides APIs for accessing the | |
- [Showcases](#showcases) | ||
- [Provider Request](#provider-request) | ||
- [Support](#support) | ||
- [Contributors ✨](#contributors-) | ||
- [Related repositories](#related-repositories) | ||
|
||
## Installation | ||
|
@@ -110,8 +111,14 @@ Make a new [issue](https://github.com/consumet/consumet.ts/issues/new?assignees= | |
You can contact the maintainers of consumet.ts via [email](mailto:[email protected]), or [join the discord server](https://discord.gg/qTPfvMxzNH) (Recommended). | ||
|
||
<a href="https://discord.gg/qTPfvMxzNH"> | ||
<img src="https://discordapp.com/api/guilds/987492554486452315/widget.png?style=banner2"> | ||
</p> | ||
<img src="https://discordapp.com/api/guilds/987492554486452315/widget.png?style=banner2"/> | ||
</a> | ||
|
||
|
||
## Contributors ✨ | ||
Thanks to the following people for keeping this project alive and thriving. | ||
|
||
[![](https://contrib.rocks/image?repo=consumet/consumet.ts)](https://github.com/consumet/consumet.ts/graphs/contributors) | ||
|
||
## Related repositories | ||
- [Consumet.ts](https://github.com/consumet/consumet.ts) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: 0.0 | ||
os: linux | ||
files: | ||
- source: / | ||
destination: /api-consumet-org | ||
hooks: | ||
BeforeInstall: | ||
- location: .github/scripts/install_dependencies.sh | ||
timeout: 300 | ||
runas: root | ||
|
||
ApplicationStart: | ||
- location: .github/scripts/start_server.sh | ||
timeout: 300 | ||
runas: root | ||
|
||
ValidateService: | ||
- location: .github/scripts/validate_service.sh | ||
timeout: 300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
version: 0.2 | ||
|
||
env: | ||
parameter-store: | ||
REDIS_HOST: /redis/host | ||
REDIS_PORT: /redis/port | ||
REDIS_PASSWORD: /redis/password | ||
PORT: /port | ||
NODE_ENV: /node/env | ||
|
||
phases: | ||
install: | ||
runtime-versions: | ||
nodejs: 18 | ||
commands: | ||
- echo "📦 installing packages..." | ||
- echo "✅ Packages installed successfully." | ||
pre_build: | ||
commands: | ||
- echo "⚙️ Testing..." | ||
- echo "✅ Tests passed successfully." | ||
- echo $PASSWORD | ||
|
||
build: | ||
commands: | ||
- echo "🚧 Starting compiling packages..." | ||
- echo "✅ Build passed successfully." | ||
post_build: | ||
commands: | ||
- echo "🚚 Performing post-build packing and operations..." | ||
- aws deploy push --application-name deploy.api.consumet.org --s3-location s3://deploy--deployment-revisions/development/source.zip --ignore-hidden-files | ||
- aws deploy create-deployment --application-name deploy.api.consumet.org --s3-location bucket=deploy-deployment-revisions,key=development/source.zip,bundleType=zip,eTag=80e501480a8545019660e87ca42a6f00,version=67ZE9Q8CZeo9XszaZ4F.eKmrlW7mnDrm --deployment-group-name DGN --deployment-config-name CodeDeployDefault.AllAtOnce --description "This deployment aims to deploy our code to the eligible EC2 instance(s)." | ||
- echo "✅ Post build successful" | ||
|
||
artifacts: | ||
files: | ||
- '**/*' | ||
name: deploy-build-artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Demo of Consumet API</title> | ||
<meta name="viewport" content="width=device-width"> | ||
<style> | ||
html, body { | ||
margin: 0; | ||
height: 100%; | ||
padding: 3px; | ||
font-family: Arial, sans-serif; | ||
font-size: 16px; | ||
} | ||
* { | ||
-moz-box-sizing: border-box; | ||
box-sizing: border-box; | ||
} | ||
label { display: block; } | ||
input { | ||
display: block; | ||
width: 100%; | ||
padding: 8px 5px; | ||
border: 1px solid #CCC; | ||
} | ||
button { | ||
display: inline-block; | ||
width: 49%; | ||
padding: 8px; | ||
} | ||
textarea { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
#top { | ||
height: 180px; | ||
position: relative; | ||
|
||
} | ||
#bottom { | ||
height: 100%; | ||
margin-top: -180px; | ||
padding-top: 180px; | ||
} | ||
|
||
#get { | ||
position: absolute; | ||
bottom: 0; | ||
right: 0; | ||
border-radius: 2px; | ||
border: 1px solid #CCC; | ||
background: #fd6868; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="top"> | ||
This is a demo of <a href="https://github.com/consumet/api.consumet.org">Consumet API</a>. It should be <b>only</b> used for development purposes. | ||
To temporarily unlock access to the API, click the button below and follow the instructions. | ||
<button id="get" >Request temporary access</button> | ||
</div> | ||
|
||
<script> | ||
const api_url = 'https://api.consumet.org/'; | ||
function requestAccess(options, printResult) { | ||
const x = new XMLHttpRequest(); | ||
x.open(options.method, options.url); | ||
x.onload = x.onerror = () => { | ||
if (x.status === 200) window.location.href = "/"; | ||
else printResult(x.responseText); | ||
|
||
}; | ||
x.send(options.data); | ||
} | ||
|
||
// Bind event | ||
(function() { | ||
var button = document.getElementById('get'); | ||
button.addEventListener('click', () => { | ||
requestAccess({ | ||
method: 'POST', | ||
url: api_url + 'apidemo', | ||
}, (result) => { | ||
alert(result); | ||
}); | ||
}, false); | ||
|
||
})(); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.