Refactor the app to use Express server and Jest for tests

This commit is contained in:
ngosang
2021-10-17 18:00:19 +02:00
parent 0459f2642d
commit 744de4d158
20 changed files with 9338 additions and 663 deletions

View File

@@ -3,10 +3,11 @@
"version": "1.2.9",
"description": "Proxy server to bypass Cloudflare protection.",
"scripts": {
"start": "node ./dist/index.js",
"start": "node ./dist/server.js",
"build": "tsc",
"dev": "nodemon -e ts --exec ts-node src/index.ts",
"package": "node build-binaries.js"
"dev": "nodemon -e ts --exec ts-node src/server.ts",
"package": "node build-binaries.js",
"test": "jest --runInBand"
},
"author": "Diego Heras (ngosang)",
"license": "MIT",
@@ -19,7 +20,9 @@
},
"dependencies": {
"await-timeout": "^1.1.1",
"body-parser": "^1.19.0",
"console-log-level": "^1.4.1",
"express": "^4.17.1",
"got": "^11.8.2",
"hcaptcha-solver": "^1.0.2",
"puppeteer": "^3.3.0",
@@ -27,12 +30,18 @@
},
"devDependencies": {
"@types/await-timeout": "^0.3.1",
"@types/body-parser": "^1.19.1",
"@types/express": "^4.17.13",
"@types/jest": "^27.0.2",
"@types/node": "^14.17.27",
"@types/puppeteer": "^3.0.6",
"@types/supertest": "^2.0.11",
"@types/uuid": "^8.3.1",
"archiver": "^5.3.0",
"nodemon": "^2.0.13",
"pkg": "^5.3.3",
"supertest": "^6.1.6",
"ts-jest": "^27.0.7",
"ts-node": "^10.3.0",
"typescript": "^4.4.4"
}