├── .gitignore ├── Dockerfile ├── package-lock.json ├── package.json ├── src ├── index.ts └── routes │ └── router.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Optional stylelint cache 58 | .stylelintcache 59 | 60 | # Microbundle cache 61 | .rpt2_cache/ 62 | .rts2_cache_cjs/ 63 | .rts2_cache_es/ 64 | .rts2_cache_umd/ 65 | 66 | # Optional REPL history 67 | .node_repl_history 68 | 69 | # Output of 'npm pack' 70 | *.tgz 71 | 72 | # Yarn Integrity file 73 | .yarn-integrity 74 | 75 | # dotenv environment variable files 76 | .env 77 | .env.development.local 78 | .env.test.local 79 | .env.production.local 80 | .env.local 81 | 82 | # parcel-bundler cache (https://parceljs.org/) 83 | .cache 84 | .parcel-cache 85 | 86 | # Next.js build output 87 | .next 88 | out 89 | 90 | # Nuxt.js build / generate output 91 | .nuxt 92 | dist 93 | 94 | # Gatsby files 95 | .cache/ 96 | # Comment in the public line in if your project uses Gatsby and not Next.js 97 | # https://nextjs.org/blog/next-9-1#public-directory-support 98 | # public 99 | 100 | # vuepress build output 101 | .vuepress/dist 102 | 103 | # vuepress v2.x temp and cache directory 104 | .temp 105 | .cache 106 | 107 | # Docusaurus cache and generated files 108 | .docusaurus 109 | 110 | # Serverless directories 111 | .serverless/ 112 | 113 | # FuseBox cache 114 | .fusebox/ 115 | 116 | # DynamoDB Local files 117 | .dynamodb/ 118 | 119 | # TernJS port file 120 | .tern-port 121 | 122 | # Stores VSCode versions used for testing VSCode extensions 123 | .vscode-test 124 | 125 | # yarn v2 126 | .yarn/cache 127 | .yarn/unplugged 128 | .yarn/build-state.yml 129 | .yarn/install-state.gz 130 | .pnp.* 131 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Stage 1 2 | 3 | FROM node:18 as builder 4 | 5 | WORKDIR /build 6 | 7 | COPY package*.json . 8 | RUN npm install 9 | 10 | COPY src/ src/ 11 | COPY tsconfig.json tsconfig.json 12 | 13 | RUN npm run build 14 | 15 | 16 | 17 | # Stage 2 18 | 19 | FROM node:18 as runner 20 | 21 | WORKDIR /app 22 | 23 | COPY --from=builder build/package*.json . 24 | COPY --from=builder build/node_modules node_modules/ 25 | COPY --from=builder build/dist dist/ 26 | 27 | CMD [ "npm", "start" ] -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "container-tut", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "container-tut", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "express": "^4.18.2" 13 | }, 14 | "devDependencies": { 15 | "@types/express": "^4.17.20", 16 | "typescript": "^5.2.2" 17 | } 18 | }, 19 | "node_modules/@types/body-parser": { 20 | "version": "1.19.4", 21 | "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.4.tgz", 22 | "integrity": "sha512-N7UDG0/xiPQa2D/XrVJXjkWbpqHCd2sBaB32ggRF2l83RhPfamgKGF8gwwqyksS95qUS5ZYF9aF+lLPRlwI2UA==", 23 | "dev": true, 24 | "dependencies": { 25 | "@types/connect": "*", 26 | "@types/node": "*" 27 | } 28 | }, 29 | "node_modules/@types/connect": { 30 | "version": "3.4.37", 31 | "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.37.tgz", 32 | "integrity": "sha512-zBUSRqkfZ59OcwXon4HVxhx5oWCJmc0OtBTK05M+p0dYjgN6iTwIL2T/WbsQZrEsdnwaF9cWQ+azOnpPvIqY3Q==", 33 | "dev": true, 34 | "dependencies": { 35 | "@types/node": "*" 36 | } 37 | }, 38 | "node_modules/@types/express": { 39 | "version": "4.17.20", 40 | "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.20.tgz", 41 | "integrity": "sha512-rOaqlkgEvOW495xErXMsmyX3WKBInbhG5eqojXYi3cGUaLoRDlXa5d52fkfWZT963AZ3v2eZ4MbKE6WpDAGVsw==", 42 | "dev": true, 43 | "dependencies": { 44 | "@types/body-parser": "*", 45 | "@types/express-serve-static-core": "^4.17.33", 46 | "@types/qs": "*", 47 | "@types/serve-static": "*" 48 | } 49 | }, 50 | "node_modules/@types/express-serve-static-core": { 51 | "version": "4.17.39", 52 | "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.39.tgz", 53 | "integrity": "sha512-BiEUfAiGCOllomsRAZOiMFP7LAnrifHpt56pc4Z7l9K6ACyN06Ns1JLMBxwkfLOjJRlSf06NwWsT7yzfpaVpyQ==", 54 | "dev": true, 55 | "dependencies": { 56 | "@types/node": "*", 57 | "@types/qs": "*", 58 | "@types/range-parser": "*", 59 | "@types/send": "*" 60 | } 61 | }, 62 | "node_modules/@types/http-errors": { 63 | "version": "2.0.3", 64 | "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.3.tgz", 65 | "integrity": "sha512-pP0P/9BnCj1OVvQR2lF41EkDG/lWWnDyA203b/4Fmi2eTyORnBtcDoKDwjWQthELrBvWkMOrvSOnZ8OVlW6tXA==", 66 | "dev": true 67 | }, 68 | "node_modules/@types/mime": { 69 | "version": "1.3.4", 70 | "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.4.tgz", 71 | "integrity": "sha512-1Gjee59G25MrQGk8bsNvC6fxNiRgUlGn2wlhGf95a59DrprnnHk80FIMMFG9XHMdrfsuA119ht06QPDXA1Z7tw==", 72 | "dev": true 73 | }, 74 | "node_modules/@types/node": { 75 | "version": "20.8.9", 76 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.9.tgz", 77 | "integrity": "sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg==", 78 | "dev": true, 79 | "dependencies": { 80 | "undici-types": "~5.26.4" 81 | } 82 | }, 83 | "node_modules/@types/qs": { 84 | "version": "6.9.9", 85 | "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.9.tgz", 86 | "integrity": "sha512-wYLxw35euwqGvTDx6zfY1vokBFnsK0HNrzc6xNHchxfO2hpuRg74GbkEW7e3sSmPvj0TjCDT1VCa6OtHXnubsg==", 87 | "dev": true 88 | }, 89 | "node_modules/@types/range-parser": { 90 | "version": "1.2.6", 91 | "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.6.tgz", 92 | "integrity": "sha512-+0autS93xyXizIYiyL02FCY8N+KkKPhILhcUSA276HxzreZ16kl+cmwvV2qAM/PuCCwPXzOXOWhiPcw20uSFcA==", 93 | "dev": true 94 | }, 95 | "node_modules/@types/send": { 96 | "version": "0.17.3", 97 | "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.3.tgz", 98 | "integrity": "sha512-/7fKxvKUoETxjFUsuFlPB9YndePpxxRAOfGC/yJdc9kTjTeP5kRCTzfnE8kPUKCeyiyIZu0YQ76s50hCedI1ug==", 99 | "dev": true, 100 | "dependencies": { 101 | "@types/mime": "^1", 102 | "@types/node": "*" 103 | } 104 | }, 105 | "node_modules/@types/serve-static": { 106 | "version": "1.15.4", 107 | "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.4.tgz", 108 | "integrity": "sha512-aqqNfs1XTF0HDrFdlY//+SGUxmdSUbjeRXb5iaZc3x0/vMbYmdw9qvOgHWOyyLFxSSRnUuP5+724zBgfw8/WAw==", 109 | "dev": true, 110 | "dependencies": { 111 | "@types/http-errors": "*", 112 | "@types/mime": "*", 113 | "@types/node": "*" 114 | } 115 | }, 116 | "node_modules/accepts": { 117 | "version": "1.3.8", 118 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 119 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 120 | "dependencies": { 121 | "mime-types": "~2.1.34", 122 | "negotiator": "0.6.3" 123 | }, 124 | "engines": { 125 | "node": ">= 0.6" 126 | } 127 | }, 128 | "node_modules/array-flatten": { 129 | "version": "1.1.1", 130 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 131 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" 132 | }, 133 | "node_modules/body-parser": { 134 | "version": "1.20.1", 135 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", 136 | "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", 137 | "dependencies": { 138 | "bytes": "3.1.2", 139 | "content-type": "~1.0.4", 140 | "debug": "2.6.9", 141 | "depd": "2.0.0", 142 | "destroy": "1.2.0", 143 | "http-errors": "2.0.0", 144 | "iconv-lite": "0.4.24", 145 | "on-finished": "2.4.1", 146 | "qs": "6.11.0", 147 | "raw-body": "2.5.1", 148 | "type-is": "~1.6.18", 149 | "unpipe": "1.0.0" 150 | }, 151 | "engines": { 152 | "node": ">= 0.8", 153 | "npm": "1.2.8000 || >= 1.4.16" 154 | } 155 | }, 156 | "node_modules/bytes": { 157 | "version": "3.1.2", 158 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 159 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 160 | "engines": { 161 | "node": ">= 0.8" 162 | } 163 | }, 164 | "node_modules/call-bind": { 165 | "version": "1.0.5", 166 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", 167 | "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", 168 | "dependencies": { 169 | "function-bind": "^1.1.2", 170 | "get-intrinsic": "^1.2.1", 171 | "set-function-length": "^1.1.1" 172 | }, 173 | "funding": { 174 | "url": "https://github.com/sponsors/ljharb" 175 | } 176 | }, 177 | "node_modules/content-disposition": { 178 | "version": "0.5.4", 179 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", 180 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 181 | "dependencies": { 182 | "safe-buffer": "5.2.1" 183 | }, 184 | "engines": { 185 | "node": ">= 0.6" 186 | } 187 | }, 188 | "node_modules/content-type": { 189 | "version": "1.0.5", 190 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", 191 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", 192 | "engines": { 193 | "node": ">= 0.6" 194 | } 195 | }, 196 | "node_modules/cookie": { 197 | "version": "0.5.0", 198 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", 199 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", 200 | "engines": { 201 | "node": ">= 0.6" 202 | } 203 | }, 204 | "node_modules/cookie-signature": { 205 | "version": "1.0.6", 206 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 207 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" 208 | }, 209 | "node_modules/debug": { 210 | "version": "2.6.9", 211 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 212 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 213 | "dependencies": { 214 | "ms": "2.0.0" 215 | } 216 | }, 217 | "node_modules/define-data-property": { 218 | "version": "1.1.1", 219 | "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", 220 | "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", 221 | "dependencies": { 222 | "get-intrinsic": "^1.2.1", 223 | "gopd": "^1.0.1", 224 | "has-property-descriptors": "^1.0.0" 225 | }, 226 | "engines": { 227 | "node": ">= 0.4" 228 | } 229 | }, 230 | "node_modules/depd": { 231 | "version": "2.0.0", 232 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 233 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 234 | "engines": { 235 | "node": ">= 0.8" 236 | } 237 | }, 238 | "node_modules/destroy": { 239 | "version": "1.2.0", 240 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 241 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", 242 | "engines": { 243 | "node": ">= 0.8", 244 | "npm": "1.2.8000 || >= 1.4.16" 245 | } 246 | }, 247 | "node_modules/ee-first": { 248 | "version": "1.1.1", 249 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 250 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" 251 | }, 252 | "node_modules/encodeurl": { 253 | "version": "1.0.2", 254 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 255 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", 256 | "engines": { 257 | "node": ">= 0.8" 258 | } 259 | }, 260 | "node_modules/escape-html": { 261 | "version": "1.0.3", 262 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 263 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" 264 | }, 265 | "node_modules/etag": { 266 | "version": "1.8.1", 267 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 268 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", 269 | "engines": { 270 | "node": ">= 0.6" 271 | } 272 | }, 273 | "node_modules/express": { 274 | "version": "4.18.2", 275 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", 276 | "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", 277 | "dependencies": { 278 | "accepts": "~1.3.8", 279 | "array-flatten": "1.1.1", 280 | "body-parser": "1.20.1", 281 | "content-disposition": "0.5.4", 282 | "content-type": "~1.0.4", 283 | "cookie": "0.5.0", 284 | "cookie-signature": "1.0.6", 285 | "debug": "2.6.9", 286 | "depd": "2.0.0", 287 | "encodeurl": "~1.0.2", 288 | "escape-html": "~1.0.3", 289 | "etag": "~1.8.1", 290 | "finalhandler": "1.2.0", 291 | "fresh": "0.5.2", 292 | "http-errors": "2.0.0", 293 | "merge-descriptors": "1.0.1", 294 | "methods": "~1.1.2", 295 | "on-finished": "2.4.1", 296 | "parseurl": "~1.3.3", 297 | "path-to-regexp": "0.1.7", 298 | "proxy-addr": "~2.0.7", 299 | "qs": "6.11.0", 300 | "range-parser": "~1.2.1", 301 | "safe-buffer": "5.2.1", 302 | "send": "0.18.0", 303 | "serve-static": "1.15.0", 304 | "setprototypeof": "1.2.0", 305 | "statuses": "2.0.1", 306 | "type-is": "~1.6.18", 307 | "utils-merge": "1.0.1", 308 | "vary": "~1.1.2" 309 | }, 310 | "engines": { 311 | "node": ">= 0.10.0" 312 | } 313 | }, 314 | "node_modules/finalhandler": { 315 | "version": "1.2.0", 316 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", 317 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", 318 | "dependencies": { 319 | "debug": "2.6.9", 320 | "encodeurl": "~1.0.2", 321 | "escape-html": "~1.0.3", 322 | "on-finished": "2.4.1", 323 | "parseurl": "~1.3.3", 324 | "statuses": "2.0.1", 325 | "unpipe": "~1.0.0" 326 | }, 327 | "engines": { 328 | "node": ">= 0.8" 329 | } 330 | }, 331 | "node_modules/forwarded": { 332 | "version": "0.2.0", 333 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 334 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", 335 | "engines": { 336 | "node": ">= 0.6" 337 | } 338 | }, 339 | "node_modules/fresh": { 340 | "version": "0.5.2", 341 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 342 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", 343 | "engines": { 344 | "node": ">= 0.6" 345 | } 346 | }, 347 | "node_modules/function-bind": { 348 | "version": "1.1.2", 349 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 350 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 351 | "funding": { 352 | "url": "https://github.com/sponsors/ljharb" 353 | } 354 | }, 355 | "node_modules/get-intrinsic": { 356 | "version": "1.2.2", 357 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", 358 | "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", 359 | "dependencies": { 360 | "function-bind": "^1.1.2", 361 | "has-proto": "^1.0.1", 362 | "has-symbols": "^1.0.3", 363 | "hasown": "^2.0.0" 364 | }, 365 | "funding": { 366 | "url": "https://github.com/sponsors/ljharb" 367 | } 368 | }, 369 | "node_modules/gopd": { 370 | "version": "1.0.1", 371 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", 372 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 373 | "dependencies": { 374 | "get-intrinsic": "^1.1.3" 375 | }, 376 | "funding": { 377 | "url": "https://github.com/sponsors/ljharb" 378 | } 379 | }, 380 | "node_modules/has-property-descriptors": { 381 | "version": "1.0.1", 382 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", 383 | "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", 384 | "dependencies": { 385 | "get-intrinsic": "^1.2.2" 386 | }, 387 | "funding": { 388 | "url": "https://github.com/sponsors/ljharb" 389 | } 390 | }, 391 | "node_modules/has-proto": { 392 | "version": "1.0.1", 393 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", 394 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", 395 | "engines": { 396 | "node": ">= 0.4" 397 | }, 398 | "funding": { 399 | "url": "https://github.com/sponsors/ljharb" 400 | } 401 | }, 402 | "node_modules/has-symbols": { 403 | "version": "1.0.3", 404 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 405 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 406 | "engines": { 407 | "node": ">= 0.4" 408 | }, 409 | "funding": { 410 | "url": "https://github.com/sponsors/ljharb" 411 | } 412 | }, 413 | "node_modules/hasown": { 414 | "version": "2.0.0", 415 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", 416 | "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", 417 | "dependencies": { 418 | "function-bind": "^1.1.2" 419 | }, 420 | "engines": { 421 | "node": ">= 0.4" 422 | } 423 | }, 424 | "node_modules/http-errors": { 425 | "version": "2.0.0", 426 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 427 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 428 | "dependencies": { 429 | "depd": "2.0.0", 430 | "inherits": "2.0.4", 431 | "setprototypeof": "1.2.0", 432 | "statuses": "2.0.1", 433 | "toidentifier": "1.0.1" 434 | }, 435 | "engines": { 436 | "node": ">= 0.8" 437 | } 438 | }, 439 | "node_modules/iconv-lite": { 440 | "version": "0.4.24", 441 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 442 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 443 | "dependencies": { 444 | "safer-buffer": ">= 2.1.2 < 3" 445 | }, 446 | "engines": { 447 | "node": ">=0.10.0" 448 | } 449 | }, 450 | "node_modules/inherits": { 451 | "version": "2.0.4", 452 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 453 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 454 | }, 455 | "node_modules/ipaddr.js": { 456 | "version": "1.9.1", 457 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 458 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 459 | "engines": { 460 | "node": ">= 0.10" 461 | } 462 | }, 463 | "node_modules/media-typer": { 464 | "version": "0.3.0", 465 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 466 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", 467 | "engines": { 468 | "node": ">= 0.6" 469 | } 470 | }, 471 | "node_modules/merge-descriptors": { 472 | "version": "1.0.1", 473 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 474 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" 475 | }, 476 | "node_modules/methods": { 477 | "version": "1.1.2", 478 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 479 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", 480 | "engines": { 481 | "node": ">= 0.6" 482 | } 483 | }, 484 | "node_modules/mime": { 485 | "version": "1.6.0", 486 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 487 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 488 | "bin": { 489 | "mime": "cli.js" 490 | }, 491 | "engines": { 492 | "node": ">=4" 493 | } 494 | }, 495 | "node_modules/mime-db": { 496 | "version": "1.52.0", 497 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 498 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 499 | "engines": { 500 | "node": ">= 0.6" 501 | } 502 | }, 503 | "node_modules/mime-types": { 504 | "version": "2.1.35", 505 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 506 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 507 | "dependencies": { 508 | "mime-db": "1.52.0" 509 | }, 510 | "engines": { 511 | "node": ">= 0.6" 512 | } 513 | }, 514 | "node_modules/ms": { 515 | "version": "2.0.0", 516 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 517 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 518 | }, 519 | "node_modules/negotiator": { 520 | "version": "0.6.3", 521 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 522 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", 523 | "engines": { 524 | "node": ">= 0.6" 525 | } 526 | }, 527 | "node_modules/object-inspect": { 528 | "version": "1.13.1", 529 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", 530 | "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", 531 | "funding": { 532 | "url": "https://github.com/sponsors/ljharb" 533 | } 534 | }, 535 | "node_modules/on-finished": { 536 | "version": "2.4.1", 537 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 538 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 539 | "dependencies": { 540 | "ee-first": "1.1.1" 541 | }, 542 | "engines": { 543 | "node": ">= 0.8" 544 | } 545 | }, 546 | "node_modules/parseurl": { 547 | "version": "1.3.3", 548 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 549 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 550 | "engines": { 551 | "node": ">= 0.8" 552 | } 553 | }, 554 | "node_modules/path-to-regexp": { 555 | "version": "0.1.7", 556 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 557 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" 558 | }, 559 | "node_modules/proxy-addr": { 560 | "version": "2.0.7", 561 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 562 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 563 | "dependencies": { 564 | "forwarded": "0.2.0", 565 | "ipaddr.js": "1.9.1" 566 | }, 567 | "engines": { 568 | "node": ">= 0.10" 569 | } 570 | }, 571 | "node_modules/qs": { 572 | "version": "6.11.0", 573 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", 574 | "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", 575 | "dependencies": { 576 | "side-channel": "^1.0.4" 577 | }, 578 | "engines": { 579 | "node": ">=0.6" 580 | }, 581 | "funding": { 582 | "url": "https://github.com/sponsors/ljharb" 583 | } 584 | }, 585 | "node_modules/range-parser": { 586 | "version": "1.2.1", 587 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 588 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 589 | "engines": { 590 | "node": ">= 0.6" 591 | } 592 | }, 593 | "node_modules/raw-body": { 594 | "version": "2.5.1", 595 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", 596 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", 597 | "dependencies": { 598 | "bytes": "3.1.2", 599 | "http-errors": "2.0.0", 600 | "iconv-lite": "0.4.24", 601 | "unpipe": "1.0.0" 602 | }, 603 | "engines": { 604 | "node": ">= 0.8" 605 | } 606 | }, 607 | "node_modules/safe-buffer": { 608 | "version": "5.2.1", 609 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 610 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 611 | "funding": [ 612 | { 613 | "type": "github", 614 | "url": "https://github.com/sponsors/feross" 615 | }, 616 | { 617 | "type": "patreon", 618 | "url": "https://www.patreon.com/feross" 619 | }, 620 | { 621 | "type": "consulting", 622 | "url": "https://feross.org/support" 623 | } 624 | ] 625 | }, 626 | "node_modules/safer-buffer": { 627 | "version": "2.1.2", 628 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 629 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 630 | }, 631 | "node_modules/send": { 632 | "version": "0.18.0", 633 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", 634 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", 635 | "dependencies": { 636 | "debug": "2.6.9", 637 | "depd": "2.0.0", 638 | "destroy": "1.2.0", 639 | "encodeurl": "~1.0.2", 640 | "escape-html": "~1.0.3", 641 | "etag": "~1.8.1", 642 | "fresh": "0.5.2", 643 | "http-errors": "2.0.0", 644 | "mime": "1.6.0", 645 | "ms": "2.1.3", 646 | "on-finished": "2.4.1", 647 | "range-parser": "~1.2.1", 648 | "statuses": "2.0.1" 649 | }, 650 | "engines": { 651 | "node": ">= 0.8.0" 652 | } 653 | }, 654 | "node_modules/send/node_modules/ms": { 655 | "version": "2.1.3", 656 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 657 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 658 | }, 659 | "node_modules/serve-static": { 660 | "version": "1.15.0", 661 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", 662 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", 663 | "dependencies": { 664 | "encodeurl": "~1.0.2", 665 | "escape-html": "~1.0.3", 666 | "parseurl": "~1.3.3", 667 | "send": "0.18.0" 668 | }, 669 | "engines": { 670 | "node": ">= 0.8.0" 671 | } 672 | }, 673 | "node_modules/set-function-length": { 674 | "version": "1.1.1", 675 | "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", 676 | "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", 677 | "dependencies": { 678 | "define-data-property": "^1.1.1", 679 | "get-intrinsic": "^1.2.1", 680 | "gopd": "^1.0.1", 681 | "has-property-descriptors": "^1.0.0" 682 | }, 683 | "engines": { 684 | "node": ">= 0.4" 685 | } 686 | }, 687 | "node_modules/setprototypeof": { 688 | "version": "1.2.0", 689 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 690 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" 691 | }, 692 | "node_modules/side-channel": { 693 | "version": "1.0.4", 694 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 695 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 696 | "dependencies": { 697 | "call-bind": "^1.0.0", 698 | "get-intrinsic": "^1.0.2", 699 | "object-inspect": "^1.9.0" 700 | }, 701 | "funding": { 702 | "url": "https://github.com/sponsors/ljharb" 703 | } 704 | }, 705 | "node_modules/statuses": { 706 | "version": "2.0.1", 707 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 708 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", 709 | "engines": { 710 | "node": ">= 0.8" 711 | } 712 | }, 713 | "node_modules/toidentifier": { 714 | "version": "1.0.1", 715 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 716 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", 717 | "engines": { 718 | "node": ">=0.6" 719 | } 720 | }, 721 | "node_modules/type-is": { 722 | "version": "1.6.18", 723 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 724 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 725 | "dependencies": { 726 | "media-typer": "0.3.0", 727 | "mime-types": "~2.1.24" 728 | }, 729 | "engines": { 730 | "node": ">= 0.6" 731 | } 732 | }, 733 | "node_modules/typescript": { 734 | "version": "5.2.2", 735 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", 736 | "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", 737 | "dev": true, 738 | "bin": { 739 | "tsc": "bin/tsc", 740 | "tsserver": "bin/tsserver" 741 | }, 742 | "engines": { 743 | "node": ">=14.17" 744 | } 745 | }, 746 | "node_modules/undici-types": { 747 | "version": "5.26.5", 748 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", 749 | "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", 750 | "dev": true 751 | }, 752 | "node_modules/unpipe": { 753 | "version": "1.0.0", 754 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 755 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", 756 | "engines": { 757 | "node": ">= 0.8" 758 | } 759 | }, 760 | "node_modules/utils-merge": { 761 | "version": "1.0.1", 762 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 763 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", 764 | "engines": { 765 | "node": ">= 0.4.0" 766 | } 767 | }, 768 | "node_modules/vary": { 769 | "version": "1.1.2", 770 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 771 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", 772 | "engines": { 773 | "node": ">= 0.8" 774 | } 775 | } 776 | } 777 | } 778 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "container-tut", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node dist/index", 8 | "build": "tsc -p ." 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "express": "^4.18.2" 14 | }, 15 | "devDependencies": { 16 | "@types/express": "^4.17.20", 17 | "typescript": "^5.2.2" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import router from "./routes/router"; 3 | 4 | const app = express(); 5 | const PORT = process.env.PORT ?? 8000; 6 | 7 | app.use("/", router); 8 | 9 | app.listen(PORT, () => console.log(`Server Started on PORT ${PORT} 🎉`)); 10 | -------------------------------------------------------------------------------- /src/routes/router.ts: -------------------------------------------------------------------------------- 1 | import { Router } from "express"; 2 | 3 | const router = Router(); 4 | 5 | router.get("/", (req, res) => res.json({ message: "Hello from Docker v3 🎉" })); 6 | 7 | router.get("/health", (req, res) => { 8 | throw new Error("Internal Server Error"); 9 | res.status(200).json({ message: "Everything is good here 👀" }); 10 | }); 11 | 12 | export default router; 13 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 26 | 27 | /* Modules */ 28 | "module": "commonjs" /* Specify what module code is generated. */, 29 | "rootDir": "./src" /* Specify the root folder within your source files. */, 30 | // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ 31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 | // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ 39 | // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ 40 | // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ 41 | // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ 42 | // "resolveJsonModule": true, /* Enable importing .json files. */ 43 | // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ 44 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 45 | 46 | /* JavaScript Support */ 47 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 48 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 49 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 50 | 51 | /* Emit */ 52 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 53 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 54 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 55 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 56 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 57 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 58 | "outDir": "./dist" /* Specify an output folder for all emitted files. */, 59 | // "removeComments": true, /* Disable emitting comments. */ 60 | // "noEmit": true, /* Disable emitting files from a compilation. */ 61 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 62 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 63 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 64 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 65 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 66 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 67 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 68 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 69 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 70 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 71 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 72 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 73 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 74 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 75 | 76 | /* Interop Constraints */ 77 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 78 | // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ 79 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 80 | "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, 81 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 82 | "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, 83 | 84 | /* Type Checking */ 85 | "strict": true /* Enable all strict type-checking options. */, 86 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 87 | // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 88 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 89 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 90 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 91 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 92 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 93 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 94 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 95 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 96 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 97 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 98 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 99 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 100 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 101 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 102 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 103 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 104 | 105 | /* Completeness */ 106 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 107 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 108 | } 109 | } 110 | --------------------------------------------------------------------------------