forked from derpbyte/discord-proxied
-
Notifications
You must be signed in to change notification settings - Fork 33
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
0 parents
commit 18bd937
Showing
18 changed files
with
41,715 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: npm start |
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,7 @@ | ||
{ | ||
"name": "Ultraviolet App", | ||
"description": "Node.js Ultraviolet instance", | ||
"repository": "https://github.com/titaniumnetwork-dev/ultraviolet-web-app", | ||
"logo": "https://github.com/titaniumnetwork-dev/Ultraviolet/blob/main/uv.png?raw=true", | ||
"keywords": ["tomp", "ultraviolet"] | ||
} |
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,3 @@ | ||
(async() => { | ||
await import('./index.mjs'); | ||
})(); |
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,29 @@ | ||
import createServer from '@tomphttp/bare-server-node'; | ||
import http from 'http'; | ||
import nodeStatic from 'node-static'; | ||
|
||
|
||
const bare = createServer('/bare/'); | ||
const serve = new nodeStatic.Server('static/'); | ||
|
||
const server = http.createServer(); | ||
|
||
server.on('request', (req, res) => { | ||
if (bare.shouldRoute(req)) { | ||
bare.routeRequest(req, res); | ||
} else { | ||
serve.serve(req, res); | ||
} | ||
}); | ||
|
||
server.on('upgrade', (req, socket, head) => { | ||
if (bare.shouldRoute(req, socket, head)) { | ||
bare.routeUpgrade(req, socket, head); | ||
}else{ | ||
socket.end(); | ||
} | ||
}); | ||
|
||
server.listen({ | ||
port: process.env.PORT || 8080, | ||
}); |
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,13 @@ | ||
#!/bin/bash | ||
# Set this to 1 to automatically attempt a fix when an error occurs while running npm start. | ||
fix=0 | ||
|
||
|
||
# Stuff to do at first run(submodule, npm install). | ||
if [[ -d "static" && -n "$(find static -prune -empty 2>/dev/null)" ]] || [[ ! -d "static" ]]; then | ||
npm install | ||
git submodule update --init --recursive | ||
fi | ||
|
||
|
||
npm start || [[ $fix = 1 ]] && npm install && npm update && git submodule update --init --recursive |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,20 @@ | ||
{ | ||
"dependencies": { | ||
"@tomphttp/bare-server-node": "^1.0.2-beta-readme2", | ||
"bare-server-node": "github:tomphttp/bare-server-node", | ||
"node-static": "^0.7.11" | ||
}, | ||
"name": "uv-app", | ||
"version": "1.0.0", | ||
"description": "Ultraviolet instance", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"start": "node ." | ||
}, | ||
"keywords": [ | ||
"proxy" | ||
], | ||
"author": "", | ||
"license": "GPL-3.0-or-later" | ||
} |
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,8 @@ | ||
{ pkgs }: { | ||
deps = [ | ||
pkgs.nodejs-16_x | ||
pkgs.nodePackages.typescript-language-server | ||
pkgs.yarn | ||
pkgs.replitPackages.jest | ||
]; | ||
} |
Oops, something went wrong.