diff --git a/.gitignore b/.gitignore index 28f5f77..4b1489a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /node_modules .env -/repos \ No newline at end of file +/repos +/dist \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 459903a..0000000 --- a/dist/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import express from 'express'; -import 'dotenv/config'; -const app = express(); -app.get('/', (req, res) => { - res.send('Hey! This is sern automata\'s Rest API/webhook server/control server!'); -}); -app.get('/wh/newRelease', (req, res) => { -}); -app.listen(3000, () => console.log('Listening!')); diff --git a/index.ts b/index.ts index fba76d1..decc7e9 100644 --- a/index.ts +++ b/index.ts @@ -1,7 +1,9 @@ import express from 'express'; +import bodyParser from 'body-parser'; import 'dotenv/config'; const app = express() +app.use(bodyParser) app.get('/', (req, res) => { res.send('Hey! This is sern automata\'s Rest API/webhook server/control server!') diff --git a/package.json b/package.json index 0f37770..c06d493 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ }, "type": "module", "dependencies": { + "body-parser": "^1.20.2", "cookie-parser": "~1.4.4", "debug": "~2.6.9", "dotenv": "^16.0.3", diff --git a/tsconfig.json b/tsconfig.json index 5028352..7020110 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -104,6 +104,9 @@ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - } + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "repos/*" + ] } diff --git a/yarn.lock b/yarn.lock index 6276a84..0648a3f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -138,6 +138,24 @@ body-parser@1.20.1: type-is "~1.6.18" unpipe "1.0.0" +body-parser@^1.20.2: + version "1.20.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" + integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== + dependencies: + bytes "3.1.2" + content-type "~1.0.5" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.2" + type-is "~1.6.18" + unpipe "1.0.0" + bytes@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" @@ -212,7 +230,7 @@ content-disposition@0.5.4: dependencies: safe-buffer "5.2.1" -content-type@~1.0.4: +content-type@~1.0.4, content-type@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== @@ -780,6 +798,16 @@ raw-body@2.5.1: iconv-lite "0.4.24" unpipe "1.0.0" +raw-body@2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + repeat-string@^1.5.2: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"