Skip to content

Commit

Permalink
Removed fastify
Browse files Browse the repository at this point in the history
  • Loading branch information
Eltik committed Mar 11, 2023
1 parent f5e4ff1 commit cf4a1a4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
11 changes: 3 additions & 8 deletions built/server.js

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

2 changes: 1 addition & 1 deletion built/server.js.map

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

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@
},
"homepage": "https://github.com/Eltik/M3U8-Proxy#readme",
"dependencies": {
"@fastify/cors": "^8.2.0",
"axios": "^0.27.2",
"colors": "^1.4.0",
"dotenv": "^16.0.3",
"fastify": "^4.13.0"
"dotenv": "^16.0.3"
}
}
11 changes: 3 additions & 8 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@ import M3U8Proxy from "./libraries/M3U8Proxy";
import { join } from "path";
import { readFileSync } from "fs";
import API from "./API";
import colors from "colors";

dotenv.config();

const api = new API();

const server = http.createServer((req, res) => {
/*
res.statusCode = 200;
res.setHeader("Content-Type", "text/plain");
res.end("Hello, world!");
*/
});
const server = http.createServer();

server.on("request", async (req, res) => {
const uri = new URL(req.url, "http://localhost:3000");
Expand All @@ -36,5 +31,5 @@ server.on("request", async (req, res) => {
});

server.listen(api.config.web_server.port, () => {
console.log("Server running");
console.log(colors.green("Server running on ") + colors.blue(`http://localhost:${api.config.web_server.port}`));
});

0 comments on commit cf4a1a4

Please sign in to comment.