diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ad5e45c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +package.json +package-lock.json \ No newline at end of file diff --git a/src/data.csv b/src/data.csv index 27128dd..f7a1ac6 100644 --- a/src/data.csv +++ b/src/data.csv @@ -1,73 +1,2 @@ -Sophia Anderson, sophiaanderson@gmail.com,9807654350,Transformers One,A,5 -Mason Allen, masonallen@gmail.com,9807654370,Inception,A,7 -Benjamin Davis, benjamindavis@gmail.com,9807654360,Oppenheimer,A,4 -Ethan Ramirez, ethanramirez@gmail.com,9807654340,Dune 2,A,7 -Ella Scott, ellascott@gmail.com,9807654372,Inception,C,14 -Emma Garcia, emmagarcia@gmail.com,9807654352,Transformers One,C,3 -Avery Wilson, averywilson@gmail.com,9807654361,Oppenheimer,B,1 -Lily Martinez, lilymartinez@gmail.com,9807654341,Dune 2,B,2 -Harper Young, harperyoung@gmail.com,9807654371,Inception,B,2 -William White, williamwhite@gmail.com,9807654351,Transformers One,B,9 -Olivia Johnson, oliviajohnson@gmail.com,9807654354,Transformers One,E,2 -Zoe Adams, zoeadams@gmail.com,9807654374,Inception,E,4 -Jonathan Harris, jonathanharris@gmail.com,9807654344,Dune 2,E,4 -Natalie Clark, natalieclark@gmail.com,9807654364,Oppenheimer,E,8 -Stella Wright, stellawright@gmail.com,9807654384,Tenet,E,2 -Sophia King, sophiaking@gmail.com,9807654333,Dune 2,D,9 -Evelyn Brown, evelynbrown@gmail.com,9807654362,Oppenheimer,C,9 -Ryan Thompson, ryanthompson@gmail.com,9807654342,Dune 2,C,14 -Eva Adams, evaadams@gmail.com,9807654386,Tenet,G,6 -Olivia Allen, oliviaallen@gmail.com,9807654331,Dune 2,B,2 -Lucy Baker, lucybaker@gmail.com,9807654382,Tenet,C,3 -Jackson Taylor, jacksontaylor@gmail.com,9807654363,Oppenheimer,D,3 -Noah Martinez, noahmartinez@gmail.com,9807654353,Transformers One,D,7 -Nolan Harris, nolanharris@gmail.com,9807654373,Inception,D,9 -Sarah Johnson, sarahjohnson@gmail.com,9807654325,Dune 2,F,3 -Connor Lee, connorlee@gmail.com,9807654375,Inception,F,13 -Grace Martinez, gracemartinez@gmail.com,9807654366,Oppenheimer,G,6 -Christopher Brown, christopherbrown@gmail.com,9807654383,Tenet,D,7 -Jacob Robinson, jacobrobinson@gmail.com,9807654346,Dune 2,G,10 -Julia King, juliaking@gmail.com,9807654376,Inception,G,10 -Emily Brown, emilybrown@gmail.com,9807654356,Transformers One,G,6 -Daniel Jones, danieljones@gmail.com,9807654357,Transformers One,H,8 -Amanda Martinez, amandamartinez@gmail.com,9807654327,Dune 2,H,1 -Grace Hill, gracehill@gmail.com,9807654335,Dune 2,F,13 -Brooklyn Garcia, brooklyngarcia@gmail.com,9807654377,Inception,H,5 -Logan Rodriguez, loganrodriguez@gmail.com,9807654367,Oppenheimer,H,7 -Aiden Perez, aidenperez@gmail.com,9807654348,Dune 2,I,8 -Levi Rodriguez, levirodriguez@gmail.com,9807654378,Inception,I,8 -Alexander Adams, alexanderadams@gmail.com,9807654338,Dune 2,I,8 -Avery Parker, averyparker@gmail.com,9807654388,Tenet,I,4 -Laura Lewis, lauralewis@gmail.com,9807654329,Dune 2,J,11 -James Garcia, jamesgarcia@gmail.com,9807654359,Transformers One,J,1 -Hannah Baker, hannahbaker@gmail.com,9807654339,Dune 2,J,3 -Lucas Hernandez, lucashernandez@gmail.com,9807654369,Oppenheimer,J,10 -Madison Taylor, madisontaylor@gmail.com,9807654379,Inception,J,3 -Isaac Turner, isaacturner@gmail.com,9807654389,Tenet,J,1 -Emily Davis, emilydavis@gmail.com,9807654323,Dune 2,D,8 -Chris Lee, chrislee@gmail.com,9807654326,Dune 2,G,15 -Michael Brown, michaelbrown@gmail.com,9807654322,Dune 2,C,5 -Daniel Wright, danielwright@gmail.com,9807654334,Dune 2,E,4 -Andrew Young, andrewyoung@gmail.com,9807654332,Dune 2,C,14 -Matthew Clark, matthewclark@gmail.com,9807654328,Dune 2,I,6 -Gabriel Walker, gabrielwalker@gmail.com,9807654387,Tenet,H,8 -Ava Taylor, avatar@gmail.com,9807654358,Transformers One,I,4 -William Wright, williamwright@gmail.com,9807654368,Oppenheimer,I,5 -Elijah Moore, elijahmoore@gmail.com,9807654365,Oppenheimer,F,2 -Joshua Scott, joshuascott@gmail.com,Dune 2,G,10 -Megan Green, megangreen@gmail.com,Dune 2,H,5 -Ava Taylor, avatar@gmail.com,Dune 2,I,4 -Isabella Walker, isabellawalker@gmail.com,Dune 2,H,5 -Samantha Lewis, samanthalewis@gmail.com,Dune 2,F,13 -Hannah Baker, hannahbaker@gmail.com,Transformers One,A,5 -Jonathan Harris, jonathanharris@gmail.com,Oppenheimer,B,1 -Abigail Anderson, abigailanderson@gmail.com,Dune 2,D,9 -Ethan Ramirez, ethanramirez@gmail.com,Inception,A,7 -Olivia Allen, oliviaallen@gmail.com,Inception,B,2 -Sophia King, sophiaking@gmail.com,Oppenheimer,C,9 -Andrew Young, andrewyoung@gmail.com,Dune 2,C,14 -Zoe Adams, zoeadams@gmail.com,Transformers One,E,2 -Hannah Baker, hannahbaker@gmail.com,Oppenheimer,J,10 -Sophia King, sophiaking@gmail.com,Dune 2,D,9 -James Garcia, jamesgarcia@gmail.com,Transformers One,J,1 -Stella Wright, stellawright@gmail.com,Oppenheimer +Name,Email,Mobile,Movie,Seat +David,malan@gmail.com,1234567890,undefined,undefined diff --git a/src/main.exe b/src/main.exe new file mode 100644 index 0000000..ef292b9 Binary files /dev/null and b/src/main.exe differ diff --git a/src/package-lock.json b/src/package-lock.json new file mode 100644 index 0000000..1230cc8 --- /dev/null +++ b/src/package-lock.json @@ -0,0 +1,867 @@ +{ + "name": "movie-booking-cli", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "movie-booking-cli", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "accepts": "^1.3.8", + "array-flatten": "^1.1.1", + "body-parser": "^1.20.3", + "bytes": "^3.1.2", + "call-bind": "^1.0.7", + "content-disposition": "^0.5.4", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.0.6", + "csv-parser": "^3.0.0", + "debug": "^2.6.9", + "define-data-property": "^1.1.4", + "depd": "^2.0.0", + "destroy": "^1.2.0", + "ee-first": "^1.1.1", + "encodeurl": "^2.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "express": "^4.21.1", + "finalhandler": "^1.3.1", + "forwarded": "^0.2.0", + "fresh": "^0.5.2", + "fs": "^0.0.1-security", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "http-errors": "^2.0.0", + "iconv-lite": "^0.4.24", + "inherits": "^2.0.4", + "ipaddr.js": "^1.9.1", + "media-typer": "^0.3.0", + "merge-descriptors": "^1.0.3", + "methods": "^1.1.2", + "mime": "^1.6.0", + "mime-db": "^1.52.0", + "mime-types": "^2.1.35", + "ms": "^2.0.0", + "negotiator": "^0.6.3", + "object-inspect": "^1.13.2", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "path-to-regexp": "^0.1.10", + "proxy-addr": "^2.0.7", + "qs": "^6.13.0", + "range-parser": "^1.2.1", + "raw-body": "^2.5.2", + "safe-buffer": "^5.2.1", + "safer-buffer": "^2.1.2", + "send": "^0.19.0", + "serve-static": "^1.16.2", + "set-function-length": "^1.2.2", + "setprototypeof": "^1.2.0", + "side-channel": "^1.0.6", + "statuses": "^2.0.1", + "toidentifier": "^1.0.1", + "type-is": "^1.6.18", + "unpipe": "^1.0.0", + "utils-merge": "^1.0.1", + "vary": "^1.1.2" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", + "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.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" + }, + "node_modules/csv-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/csv-parser/-/csv-parser-3.0.0.tgz", + "integrity": "sha512-s6OYSXAK3IdKqYO33y09jhypG/bSDHPuyCme/IdEHfWpLf/jKcpitVFyOC6UemgGk8v7Q5u2XE0vvwmanxhGlQ==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "csv-parser": "bin/csv-parser" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.10", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==", + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "license": "MIT" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + } + } +} diff --git a/src/package.json b/src/package.json new file mode 100644 index 0000000..21d2545 --- /dev/null +++ b/src/package.json @@ -0,0 +1,79 @@ +{ + "name": "movie-booking-cli", + "version": "1.0.0", + "description": "This is a mini project in C language on a movie booking UI.", + "main": "index.js", + "dependencies": { + "accepts": "^1.3.8", + "array-flatten": "^1.1.1", + "body-parser": "^1.20.3", + "bytes": "^3.1.2", + "call-bind": "^1.0.7", + "content-disposition": "^0.5.4", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.0.6", + "csv-parser": "^3.0.0", + "debug": "^2.6.9", + "define-data-property": "^1.1.4", + "depd": "^2.0.0", + "destroy": "^1.2.0", + "ee-first": "^1.1.1", + "encodeurl": "^2.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "express": "^4.21.1", + "finalhandler": "^1.3.1", + "forwarded": "^0.2.0", + "fresh": "^0.5.2", + "fs": "^0.0.1-security", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "http-errors": "^2.0.0", + "iconv-lite": "^0.4.24", + "inherits": "^2.0.4", + "ipaddr.js": "^1.9.1", + "media-typer": "^0.3.0", + "merge-descriptors": "^1.0.3", + "methods": "^1.1.2", + "mime": "^1.6.0", + "mime-db": "^1.52.0", + "mime-types": "^2.1.35", + "ms": "^2.0.0", + "negotiator": "^0.6.3", + "object-inspect": "^1.13.2", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "path-to-regexp": "^0.1.10", + "proxy-addr": "^2.0.7", + "qs": "^6.13.0", + "range-parser": "^1.2.1", + "raw-body": "^2.5.2", + "safe-buffer": "^5.2.1", + "safer-buffer": "^2.1.2", + "send": "^0.19.0", + "serve-static": "^1.16.2", + "set-function-length": "^1.2.2", + "setprototypeof": "^1.2.0", + "side-channel": "^1.0.6", + "statuses": "^2.0.1", + "toidentifier": "^1.0.1", + "type-is": "^1.6.18", + "unpipe": "^1.0.0", + "utils-merge": "^1.0.1", + "vary": "^1.1.2" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC" +} diff --git a/src/public/index.html b/src/public/index.html new file mode 100644 index 0000000..4761073 --- /dev/null +++ b/src/public/index.html @@ -0,0 +1,52 @@ + + + + + + Movie Booking System + + + +
+

Book Your Show

+ +
+

Enter Details

+ + + + +
+
+

Show Details

+ + +
+
+
+

Book Movie

+ +
+ +
+
+

Generate Bill

+ + +
+
+
+ + + \ No newline at end of file diff --git a/src/public/script.js b/src/public/script.js new file mode 100644 index 0000000..19e74f4 --- /dev/null +++ b/src/public/script.js @@ -0,0 +1,178 @@ +const users = []; +const movies = { + "Dune 2": Array(150).fill(false), + "Transformers One": Array(150).fill(false), + "Oppenheimer": Array(150).fill(false), + "Inception": Array(150).fill(false), + "Tenet": Array(150).fill(false), +}; + +let selectedSeat = null; + +function saveDetails() { + const name = document.getElementById("name").value; + const email = document.getElementById("email").value; + const mobile = document.getElementById("mobile").value; + + if (name && email && mobile) { + fetch("/add-user", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ name, email, mobile }), + }) + .then((response) => response.text()) + .then((message) => { + alert(message); + document.getElementById("name").value = ""; + document.getElementById("email").value = ""; + document.getElementById("mobile").value = ""; + }) + .catch((error) => { + alert("Error saving details."); + console.error(error); + }); + } else { + alert("Please fill in all fields."); + } +} + +function loadUsers() { + fetch("/get-users") + .then((response) => response.json()) + .then((data) => { + users.length = 0; + users.push(...data); + }) + .catch((error) => { + console.error("Error loading users:", error); + }); +} + +function searchDetails() { + const searchName = document.getElementById("searchName").value.toLowerCase(); + fetch(`/search-users?name=${searchName}`) + .then((response) => response.json()) + .then((users) => { + const searchResults = document.getElementById("searchResults"); + searchResults.innerHTML = ""; + if (users.length === 0) { + searchResults.innerHTML = "

No users found.

"; + } else { + users.forEach((user) => { + const userDiv = document.createElement("div"); + userDiv.textContent = `${user.name} - ${user.email} - ${user.mobile}`; + searchResults.appendChild(userDiv); + }); + } + }) + .catch((error) => { + console.error("Error fetching users:", error); + }); +} + +function showSection(sectionId) { + document.querySelectorAll(".section").forEach((section) => { + section.style.display = "none"; + }); + document.getElementById(sectionId).style.display = "block"; + if (sectionId === "bookMovie") { + renderSeatMap(); + } +} + +function renderSeatMap() { + const movie = document.getElementById("movieSelect").value; + const seatMap = document.getElementById("seatMap"); + seatMap.innerHTML = ""; + movies[movie].forEach((booked, index) => { + const row = String.fromCharCode(65 + Math.floor(index / 15)); + const seatNum = (index % 15) + 1; + const seat = document.createElement("div"); + seat.className = `seat${booked ? " booked" : ""}`; + seat.textContent = `${row}${seatNum}`; + + if (!booked) { + seat.onclick = () => selectSeat(index); + } + + seatMap.appendChild(seat); + }); +} + +function selectSeat(index) { + const movie = document.getElementById("movieSelect").value; + const seatMap = document.getElementById("seatMap"); + + if (movies[movie][index]) { + alert("This seat is already booked!"); + return; + } + + if (selectedSeat !== null) { + const previousSeat = seatMap.children[selectedSeat]; + previousSeat.classList.remove("selected"); + } + + selectedSeat = index; + seatMap.children[selectedSeat].classList.add("selected"); +} + +function bookSeat() { + const name = document.getElementById("name").value.trim(); + const email = document.getElementById("email").value.trim(); + const mobile = document.getElementById("mobile").value.trim(); + const movie = document.getElementById("movieSelect").value; + + if (!name || !email || !mobile || selectedSeat === null) { + alert("Please fill in all details and select a seat."); + return; + } + + const seatIndex = selectedSeat; + const row = String.fromCharCode(65 + Math.floor(seatIndex / 15)); + const seatNum = (seatIndex % 15) + 1; + const seatBooked = `${row}${seatNum}`; + + users.push({ name, email, mobile, movie, seat: seatBooked }); + movies[movie][seatIndex] = true; + const seat = document.getElementById("seatMap").children[seatIndex]; + seat.classList.add("booked"); + seat.classList.remove("selected"); + + alert(`Seat ${seatBooked} booked successfully for ${movie}!`); + + selectedSeat = null; + renderSeatMap(); +} + +function generateBill() { + const name = document.getElementById("billName").value.toLowerCase(); + const user = users.find((u) => u.name.toLowerCase() === name); + + if (user && user.movie && user.seat) { + const billDetails = document.getElementById("billDetails"); + const totalPrice = getSeatPrice(user.seat); + + billDetails.innerHTML = ` +

Bill for ${user.name}

+

Email: ${user.email}

+

Mobile: ${user.mobile}

+

Movie: ${user.movie}

+

Seat: ${user.seat}

+

Total Price: $${totalPrice}

+ `; + } else { + alert("User not found or seat/movie details missing!"); + } +} + +function getSeatPrice(seat) { + const row = seat.charAt(0); + if (row === "J") return 500; + if (row >= "G" && row <= "I") return 300; + return 200; +} + +showSection("details"); \ No newline at end of file diff --git a/src/public/styles.css b/src/public/styles.css new file mode 100644 index 0000000..59c991c --- /dev/null +++ b/src/public/styles.css @@ -0,0 +1,83 @@ +body { + font-family: Arial, sans-serif; + max-width: 800px; + margin: 0 auto; + padding: 20px; + background-color: #f0f0f0; + color: #333; +} + +h1 { + text-align: center; + color: #007BFF; + margin-bottom: 20px; +} + +.section { + display: none; + margin-top: 20px; + padding: 20px; + border-radius: 8px; + background-color: #fff; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +button { + margin: 5px; + padding: 10px 15px; + cursor: pointer; + border: none; + border-radius: 4px; + background-color: #007BFF; + color: white; + font-size: 14px; +} + +button:hover { + background-color: #0056b3; +} + +input, +select { + margin: 5px; + padding: 8px; + width: calc(100% - 20px); + border: 1px solid #ccc; + border-radius: 4px; +} + +#seatMap { + display: grid; + grid-template-columns: repeat(15, 1fr); + gap: 5px; + margin-top: 20px; +} + +.seat { + width: 40px; + height: 40px; + border: 1px solid #007BFF; + display: flex; + align-items: center; + justify-content: center; + border-radius: 4px; + cursor: pointer; + transition: background-color 0.3s, color 0.3s; +} + +.seat.booked { + background-color: #ff0000; + color: white; + cursor: not-allowed; +} + +.seat.selected { + background-color: #007BFF; + color: white; +} + +button#bookButton { + margin-top: 20px; + padding: 10px; + width: 100%; +} \ No newline at end of file diff --git a/src/server.js b/src/server.js new file mode 100644 index 0000000..6281c25 --- /dev/null +++ b/src/server.js @@ -0,0 +1,41 @@ +const express = require("express"); +const fs = require("fs"); +const path = require("path"); +const bodyParser = require("body-parser"); +const csvParser = require("csv-parser"); +const app = express(); +const PORT = process.env.PORT || 3000; + +app.use(express.static("public")); +app.use(bodyParser.json()); + +app.post("/add-user", (req, res) => { + const { name, email, mobile, movie, seat } = req.body; + const newUser = `${name},${email},${mobile},${movie},${seat}\n`; + fs.appendFile("data.csv", newUser, (err) => { + if (err) { + res.status(500).send("Error saving details."); + } else { + res.send("Details saved successfully."); + } + }); +}); + +app.get("/search-users", (req, res) => { + const searchName = req.query.name.toLowerCase(); + const users = []; + fs.createReadStream("data.csv") + .pipe(csvParser({ headers: ["name", "email", "mobile", "movie", "seat"] })) + .on("data", (row) => { + if (row.name.toLowerCase().includes(searchName)) { + users.push(row); + } + }) + .on("end", () => { + res.json(users); + }); +}); + +app.listen(PORT, () => { + console.log(`Server running on http://localhost:${PORT}`); +}); \ No newline at end of file