├── .DS_Store ├── .gitignore ├── POC ├── .DS_Store ├── app.js ├── methods.js ├── package-lock.json ├── package.json ├── server.js └── views │ ├── .DS_Store │ ├── 404.html │ ├── about.html │ └── index.html ├── Routers ├── bookingRouter.js ├── planRouter.js ├── reviewRouter.js └── userRouter.js ├── app.js ├── classNotes ├── 031222 1224 PM.pdf ├── 101122 913 PM.pdf ├── 131122 1003 AM.pdf ├── 151122 916 PM.pdf ├── 171122 922 PM.pdf ├── 191122 1025 AM.pdf ├── 201122 216 PM.pdf ├── 221122 917 PM.pdf ├── 241122 921 PM.pdf ├── 261122 1016 AM.pdf └── 271122 1033 AM.pdf ├── controller ├── authController.js ├── bookingController.js ├── planController.js ├── reviewController.js └── userController.js ├── helper.js ├── homework.md ├── models ├── planModel.js ├── reviewModel.js └── userModel.js ├── package-lock.json ├── package.json ├── public └── build │ ├── asset-manifest.json │ ├── favicon.ico │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ ├── robots.txt │ └── static │ ├── css │ ├── main.667c8ed4.chunk.css │ └── main.667c8ed4.chunk.css.map │ ├── js │ ├── 2.26396da2.chunk.js │ ├── 2.26396da2.chunk.js.LICENSE.txt │ ├── 2.26396da2.chunk.js.map │ ├── 3.465f953a.chunk.js │ ├── 3.465f953a.chunk.js.map │ ├── main.32ba4b6f.chunk.js │ ├── main.32ba4b6f.chunk.js.map │ ├── runtime-main.b0837650.js │ └── runtime-main.b0837650.js.map │ └── media │ ├── Avocado.a47677c6.mp4 │ ├── Capture.611de11d.png │ ├── carrot.6508ea02.png │ ├── check-mark.1c103279.png │ ├── date.fcfd3f00.png │ ├── fast.f1644b7d.png │ ├── foodiesfeed.com_pizza-ready-for-baking.848a780e.jpg │ └── star.49259244.png └── utility └── nodemailer.js /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | secrets.js -------------------------------------------------------------------------------- /POC/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/POC/.DS_Store -------------------------------------------------------------------------------- /POC/app.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const app = express(); 3 | // console.log(__dirname); 4 | 5 | app.get("/", function (req, res) { 6 | res.send("

Hello World 123

"); 7 | }); 8 | 9 | app.get("/about", function (req, res) { 10 | res.sendFile('./views/about.html',{root:__dirname}); 11 | }); 12 | 13 | // app.get("/about123", function (req, res) { 14 | // res.sendFile("/Users/abhishekgoel/backend/views/about.html"); 15 | // }); 16 | 17 | //redirect 18 | app.get('/aboutus', (req, res) => { 19 | res.redirect('/about') 20 | }) 21 | 22 | //404 page 23 | app.use((req, res) => { 24 | res.status(404).sendFile("./views/404.html", { root: __dirname }); 25 | }); 26 | 27 | 28 | 29 | 30 | app.listen(3000, () => { 31 | console.log("server is listening on port 3000"); 32 | }); 33 | 34 | // /Users/abhishekgoel/backend/views/about.html -------------------------------------------------------------------------------- /POC/methods.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const app = express(); 3 | app.use(express.json()); 4 | let user = [ 5 | { 6 | id: 1, 7 | name: "Abhishek", 8 | age: 100, 9 | }, 10 | { 11 | id: 2, 12 | name: "Rajat", 13 | age: 10, 14 | }, 15 | { 16 | id: 3, 17 | name: "Sunjyot", 18 | age: 50, 19 | }, 20 | ]; 21 | 22 | const userRouter = express.Router(); 23 | const authRouter = express.Router(); 24 | app.use('/user', userRouter); 25 | app.use("/auth", authRouter); 26 | 27 | userRouter 28 | .route("/") 29 | .get(getUser) 30 | .post(postUser) 31 | .patch(updateUser) 32 | .delete(deleteUser) 33 | 34 | userRouter 35 | .route("/:name") 36 | .get(getUserById); 37 | 38 | authRouter 39 | .route('/signup') 40 | .get() 41 | .post() 42 | //with query 43 | // app.get('/user', ) 44 | 45 | // app.post('/user', ); 46 | 47 | // app.patch('/user', ); 48 | 49 | // app.delete('/user', ) 50 | 51 | //params 52 | // app.get('/user/:name', ); 53 | 54 | function getUser(req, res){ 55 | console.log(req.query); 56 | let { name, age } = req.query; 57 | // let filteredData=user.filter(userObj => { 58 | // return (userObj.name==name && userObj.age==age) 59 | // }) 60 | // res.send(filteredData); 61 | res.send(user); 62 | } 63 | 64 | function postUser(req, res){ 65 | console.log(req.body.Name); 66 | //then i can put this in db 67 | user.push(req.body); 68 | res.json({ 69 | message: "Data received successfully", 70 | user: req.body 71 | }); 72 | } 73 | 74 | function updateUser(req, res){ 75 | console.log(req.body); 76 | let dataToBeUpdated = req.body; 77 | for (key in dataToBeUpdated) { 78 | user[key] = dataToBeUpdated[key]; 79 | } 80 | res.json({ 81 | message: "data updated succesfully" 82 | }) 83 | } 84 | 85 | function deleteUser(req, res){ 86 | user = {}; 87 | res.json({ 88 | msg: "user has been deleted" 89 | }); 90 | } 91 | 92 | function getUserById(req, res){ 93 | console.log(req.params.name); 94 | //let {id}=req.params; 95 | // let user = db.findOne(id); 96 | res.json({ msg: "user id is ", "obj": req.params }); 97 | } 98 | 99 | 100 | 101 | app.listen(5000); -------------------------------------------------------------------------------- /POC/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backend", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "dependencies": { 8 | "express": "^4.18.2", 9 | "lodash": "^4.17.21" 10 | } 11 | }, 12 | "node_modules/accepts": { 13 | "version": "1.3.8", 14 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 15 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 16 | "dependencies": { 17 | "mime-types": "~2.1.34", 18 | "negotiator": "0.6.3" 19 | }, 20 | "engines": { 21 | "node": ">= 0.6" 22 | } 23 | }, 24 | "node_modules/array-flatten": { 25 | "version": "1.1.1", 26 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 27 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" 28 | }, 29 | "node_modules/body-parser": { 30 | "version": "1.20.1", 31 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", 32 | "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", 33 | "dependencies": { 34 | "bytes": "3.1.2", 35 | "content-type": "~1.0.4", 36 | "debug": "2.6.9", 37 | "depd": "2.0.0", 38 | "destroy": "1.2.0", 39 | "http-errors": "2.0.0", 40 | "iconv-lite": "0.4.24", 41 | "on-finished": "2.4.1", 42 | "qs": "6.11.0", 43 | "raw-body": "2.5.1", 44 | "type-is": "~1.6.18", 45 | "unpipe": "1.0.0" 46 | }, 47 | "engines": { 48 | "node": ">= 0.8", 49 | "npm": "1.2.8000 || >= 1.4.16" 50 | } 51 | }, 52 | "node_modules/bytes": { 53 | "version": "3.1.2", 54 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 55 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 56 | "engines": { 57 | "node": ">= 0.8" 58 | } 59 | }, 60 | "node_modules/call-bind": { 61 | "version": "1.0.2", 62 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", 63 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", 64 | "dependencies": { 65 | "function-bind": "^1.1.1", 66 | "get-intrinsic": "^1.0.2" 67 | }, 68 | "funding": { 69 | "url": "https://github.com/sponsors/ljharb" 70 | } 71 | }, 72 | "node_modules/content-disposition": { 73 | "version": "0.5.4", 74 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", 75 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 76 | "dependencies": { 77 | "safe-buffer": "5.2.1" 78 | }, 79 | "engines": { 80 | "node": ">= 0.6" 81 | } 82 | }, 83 | "node_modules/content-type": { 84 | "version": "1.0.4", 85 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 86 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", 87 | "engines": { 88 | "node": ">= 0.6" 89 | } 90 | }, 91 | "node_modules/cookie": { 92 | "version": "0.5.0", 93 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", 94 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", 95 | "engines": { 96 | "node": ">= 0.6" 97 | } 98 | }, 99 | "node_modules/cookie-signature": { 100 | "version": "1.0.6", 101 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 102 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" 103 | }, 104 | "node_modules/debug": { 105 | "version": "2.6.9", 106 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 107 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 108 | "dependencies": { 109 | "ms": "2.0.0" 110 | } 111 | }, 112 | "node_modules/depd": { 113 | "version": "2.0.0", 114 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 115 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 116 | "engines": { 117 | "node": ">= 0.8" 118 | } 119 | }, 120 | "node_modules/destroy": { 121 | "version": "1.2.0", 122 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 123 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", 124 | "engines": { 125 | "node": ">= 0.8", 126 | "npm": "1.2.8000 || >= 1.4.16" 127 | } 128 | }, 129 | "node_modules/ee-first": { 130 | "version": "1.1.1", 131 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 132 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" 133 | }, 134 | "node_modules/encodeurl": { 135 | "version": "1.0.2", 136 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 137 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", 138 | "engines": { 139 | "node": ">= 0.8" 140 | } 141 | }, 142 | "node_modules/escape-html": { 143 | "version": "1.0.3", 144 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 145 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" 146 | }, 147 | "node_modules/etag": { 148 | "version": "1.8.1", 149 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 150 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", 151 | "engines": { 152 | "node": ">= 0.6" 153 | } 154 | }, 155 | "node_modules/express": { 156 | "version": "4.18.2", 157 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", 158 | "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", 159 | "dependencies": { 160 | "accepts": "~1.3.8", 161 | "array-flatten": "1.1.1", 162 | "body-parser": "1.20.1", 163 | "content-disposition": "0.5.4", 164 | "content-type": "~1.0.4", 165 | "cookie": "0.5.0", 166 | "cookie-signature": "1.0.6", 167 | "debug": "2.6.9", 168 | "depd": "2.0.0", 169 | "encodeurl": "~1.0.2", 170 | "escape-html": "~1.0.3", 171 | "etag": "~1.8.1", 172 | "finalhandler": "1.2.0", 173 | "fresh": "0.5.2", 174 | "http-errors": "2.0.0", 175 | "merge-descriptors": "1.0.1", 176 | "methods": "~1.1.2", 177 | "on-finished": "2.4.1", 178 | "parseurl": "~1.3.3", 179 | "path-to-regexp": "0.1.7", 180 | "proxy-addr": "~2.0.7", 181 | "qs": "6.11.0", 182 | "range-parser": "~1.2.1", 183 | "safe-buffer": "5.2.1", 184 | "send": "0.18.0", 185 | "serve-static": "1.15.0", 186 | "setprototypeof": "1.2.0", 187 | "statuses": "2.0.1", 188 | "type-is": "~1.6.18", 189 | "utils-merge": "1.0.1", 190 | "vary": "~1.1.2" 191 | }, 192 | "engines": { 193 | "node": ">= 0.10.0" 194 | } 195 | }, 196 | "node_modules/finalhandler": { 197 | "version": "1.2.0", 198 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", 199 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", 200 | "dependencies": { 201 | "debug": "2.6.9", 202 | "encodeurl": "~1.0.2", 203 | "escape-html": "~1.0.3", 204 | "on-finished": "2.4.1", 205 | "parseurl": "~1.3.3", 206 | "statuses": "2.0.1", 207 | "unpipe": "~1.0.0" 208 | }, 209 | "engines": { 210 | "node": ">= 0.8" 211 | } 212 | }, 213 | "node_modules/forwarded": { 214 | "version": "0.2.0", 215 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 216 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", 217 | "engines": { 218 | "node": ">= 0.6" 219 | } 220 | }, 221 | "node_modules/fresh": { 222 | "version": "0.5.2", 223 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 224 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", 225 | "engines": { 226 | "node": ">= 0.6" 227 | } 228 | }, 229 | "node_modules/function-bind": { 230 | "version": "1.1.1", 231 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 232 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" 233 | }, 234 | "node_modules/get-intrinsic": { 235 | "version": "1.1.3", 236 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", 237 | "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", 238 | "dependencies": { 239 | "function-bind": "^1.1.1", 240 | "has": "^1.0.3", 241 | "has-symbols": "^1.0.3" 242 | }, 243 | "funding": { 244 | "url": "https://github.com/sponsors/ljharb" 245 | } 246 | }, 247 | "node_modules/has": { 248 | "version": "1.0.3", 249 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 250 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 251 | "dependencies": { 252 | "function-bind": "^1.1.1" 253 | }, 254 | "engines": { 255 | "node": ">= 0.4.0" 256 | } 257 | }, 258 | "node_modules/has-symbols": { 259 | "version": "1.0.3", 260 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 261 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 262 | "engines": { 263 | "node": ">= 0.4" 264 | }, 265 | "funding": { 266 | "url": "https://github.com/sponsors/ljharb" 267 | } 268 | }, 269 | "node_modules/http-errors": { 270 | "version": "2.0.0", 271 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 272 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 273 | "dependencies": { 274 | "depd": "2.0.0", 275 | "inherits": "2.0.4", 276 | "setprototypeof": "1.2.0", 277 | "statuses": "2.0.1", 278 | "toidentifier": "1.0.1" 279 | }, 280 | "engines": { 281 | "node": ">= 0.8" 282 | } 283 | }, 284 | "node_modules/iconv-lite": { 285 | "version": "0.4.24", 286 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 287 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 288 | "dependencies": { 289 | "safer-buffer": ">= 2.1.2 < 3" 290 | }, 291 | "engines": { 292 | "node": ">=0.10.0" 293 | } 294 | }, 295 | "node_modules/inherits": { 296 | "version": "2.0.4", 297 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 298 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 299 | }, 300 | "node_modules/ipaddr.js": { 301 | "version": "1.9.1", 302 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 303 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 304 | "engines": { 305 | "node": ">= 0.10" 306 | } 307 | }, 308 | "node_modules/lodash": { 309 | "version": "4.17.21", 310 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 311 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" 312 | }, 313 | "node_modules/media-typer": { 314 | "version": "0.3.0", 315 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 316 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", 317 | "engines": { 318 | "node": ">= 0.6" 319 | } 320 | }, 321 | "node_modules/merge-descriptors": { 322 | "version": "1.0.1", 323 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 324 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" 325 | }, 326 | "node_modules/methods": { 327 | "version": "1.1.2", 328 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 329 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", 330 | "engines": { 331 | "node": ">= 0.6" 332 | } 333 | }, 334 | "node_modules/mime": { 335 | "version": "1.6.0", 336 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 337 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 338 | "bin": { 339 | "mime": "cli.js" 340 | }, 341 | "engines": { 342 | "node": ">=4" 343 | } 344 | }, 345 | "node_modules/mime-db": { 346 | "version": "1.52.0", 347 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 348 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 349 | "engines": { 350 | "node": ">= 0.6" 351 | } 352 | }, 353 | "node_modules/mime-types": { 354 | "version": "2.1.35", 355 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 356 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 357 | "dependencies": { 358 | "mime-db": "1.52.0" 359 | }, 360 | "engines": { 361 | "node": ">= 0.6" 362 | } 363 | }, 364 | "node_modules/ms": { 365 | "version": "2.0.0", 366 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 367 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 368 | }, 369 | "node_modules/negotiator": { 370 | "version": "0.6.3", 371 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 372 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", 373 | "engines": { 374 | "node": ">= 0.6" 375 | } 376 | }, 377 | "node_modules/object-inspect": { 378 | "version": "1.12.2", 379 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", 380 | "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", 381 | "funding": { 382 | "url": "https://github.com/sponsors/ljharb" 383 | } 384 | }, 385 | "node_modules/on-finished": { 386 | "version": "2.4.1", 387 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 388 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 389 | "dependencies": { 390 | "ee-first": "1.1.1" 391 | }, 392 | "engines": { 393 | "node": ">= 0.8" 394 | } 395 | }, 396 | "node_modules/parseurl": { 397 | "version": "1.3.3", 398 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 399 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 400 | "engines": { 401 | "node": ">= 0.8" 402 | } 403 | }, 404 | "node_modules/path-to-regexp": { 405 | "version": "0.1.7", 406 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 407 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" 408 | }, 409 | "node_modules/proxy-addr": { 410 | "version": "2.0.7", 411 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 412 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 413 | "dependencies": { 414 | "forwarded": "0.2.0", 415 | "ipaddr.js": "1.9.1" 416 | }, 417 | "engines": { 418 | "node": ">= 0.10" 419 | } 420 | }, 421 | "node_modules/qs": { 422 | "version": "6.11.0", 423 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", 424 | "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", 425 | "dependencies": { 426 | "side-channel": "^1.0.4" 427 | }, 428 | "engines": { 429 | "node": ">=0.6" 430 | }, 431 | "funding": { 432 | "url": "https://github.com/sponsors/ljharb" 433 | } 434 | }, 435 | "node_modules/range-parser": { 436 | "version": "1.2.1", 437 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 438 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 439 | "engines": { 440 | "node": ">= 0.6" 441 | } 442 | }, 443 | "node_modules/raw-body": { 444 | "version": "2.5.1", 445 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", 446 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", 447 | "dependencies": { 448 | "bytes": "3.1.2", 449 | "http-errors": "2.0.0", 450 | "iconv-lite": "0.4.24", 451 | "unpipe": "1.0.0" 452 | }, 453 | "engines": { 454 | "node": ">= 0.8" 455 | } 456 | }, 457 | "node_modules/safe-buffer": { 458 | "version": "5.2.1", 459 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 460 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 461 | "funding": [ 462 | { 463 | "type": "github", 464 | "url": "https://github.com/sponsors/feross" 465 | }, 466 | { 467 | "type": "patreon", 468 | "url": "https://www.patreon.com/feross" 469 | }, 470 | { 471 | "type": "consulting", 472 | "url": "https://feross.org/support" 473 | } 474 | ] 475 | }, 476 | "node_modules/safer-buffer": { 477 | "version": "2.1.2", 478 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 479 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 480 | }, 481 | "node_modules/send": { 482 | "version": "0.18.0", 483 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", 484 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", 485 | "dependencies": { 486 | "debug": "2.6.9", 487 | "depd": "2.0.0", 488 | "destroy": "1.2.0", 489 | "encodeurl": "~1.0.2", 490 | "escape-html": "~1.0.3", 491 | "etag": "~1.8.1", 492 | "fresh": "0.5.2", 493 | "http-errors": "2.0.0", 494 | "mime": "1.6.0", 495 | "ms": "2.1.3", 496 | "on-finished": "2.4.1", 497 | "range-parser": "~1.2.1", 498 | "statuses": "2.0.1" 499 | }, 500 | "engines": { 501 | "node": ">= 0.8.0" 502 | } 503 | }, 504 | "node_modules/send/node_modules/ms": { 505 | "version": "2.1.3", 506 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 507 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 508 | }, 509 | "node_modules/serve-static": { 510 | "version": "1.15.0", 511 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", 512 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", 513 | "dependencies": { 514 | "encodeurl": "~1.0.2", 515 | "escape-html": "~1.0.3", 516 | "parseurl": "~1.3.3", 517 | "send": "0.18.0" 518 | }, 519 | "engines": { 520 | "node": ">= 0.8.0" 521 | } 522 | }, 523 | "node_modules/setprototypeof": { 524 | "version": "1.2.0", 525 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 526 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" 527 | }, 528 | "node_modules/side-channel": { 529 | "version": "1.0.4", 530 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 531 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 532 | "dependencies": { 533 | "call-bind": "^1.0.0", 534 | "get-intrinsic": "^1.0.2", 535 | "object-inspect": "^1.9.0" 536 | }, 537 | "funding": { 538 | "url": "https://github.com/sponsors/ljharb" 539 | } 540 | }, 541 | "node_modules/statuses": { 542 | "version": "2.0.1", 543 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 544 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", 545 | "engines": { 546 | "node": ">= 0.8" 547 | } 548 | }, 549 | "node_modules/toidentifier": { 550 | "version": "1.0.1", 551 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 552 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", 553 | "engines": { 554 | "node": ">=0.6" 555 | } 556 | }, 557 | "node_modules/type-is": { 558 | "version": "1.6.18", 559 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 560 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 561 | "dependencies": { 562 | "media-typer": "0.3.0", 563 | "mime-types": "~2.1.24" 564 | }, 565 | "engines": { 566 | "node": ">= 0.6" 567 | } 568 | }, 569 | "node_modules/unpipe": { 570 | "version": "1.0.0", 571 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 572 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", 573 | "engines": { 574 | "node": ">= 0.8" 575 | } 576 | }, 577 | "node_modules/utils-merge": { 578 | "version": "1.0.1", 579 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 580 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", 581 | "engines": { 582 | "node": ">= 0.4.0" 583 | } 584 | }, 585 | "node_modules/vary": { 586 | "version": "1.1.2", 587 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 588 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", 589 | "engines": { 590 | "node": ">= 0.8" 591 | } 592 | } 593 | }, 594 | "dependencies": { 595 | "accepts": { 596 | "version": "1.3.8", 597 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 598 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 599 | "requires": { 600 | "mime-types": "~2.1.34", 601 | "negotiator": "0.6.3" 602 | } 603 | }, 604 | "array-flatten": { 605 | "version": "1.1.1", 606 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 607 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" 608 | }, 609 | "body-parser": { 610 | "version": "1.20.1", 611 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", 612 | "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", 613 | "requires": { 614 | "bytes": "3.1.2", 615 | "content-type": "~1.0.4", 616 | "debug": "2.6.9", 617 | "depd": "2.0.0", 618 | "destroy": "1.2.0", 619 | "http-errors": "2.0.0", 620 | "iconv-lite": "0.4.24", 621 | "on-finished": "2.4.1", 622 | "qs": "6.11.0", 623 | "raw-body": "2.5.1", 624 | "type-is": "~1.6.18", 625 | "unpipe": "1.0.0" 626 | } 627 | }, 628 | "bytes": { 629 | "version": "3.1.2", 630 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 631 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" 632 | }, 633 | "call-bind": { 634 | "version": "1.0.2", 635 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", 636 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", 637 | "requires": { 638 | "function-bind": "^1.1.1", 639 | "get-intrinsic": "^1.0.2" 640 | } 641 | }, 642 | "content-disposition": { 643 | "version": "0.5.4", 644 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", 645 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 646 | "requires": { 647 | "safe-buffer": "5.2.1" 648 | } 649 | }, 650 | "content-type": { 651 | "version": "1.0.4", 652 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 653 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 654 | }, 655 | "cookie": { 656 | "version": "0.5.0", 657 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", 658 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" 659 | }, 660 | "cookie-signature": { 661 | "version": "1.0.6", 662 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 663 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" 664 | }, 665 | "debug": { 666 | "version": "2.6.9", 667 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 668 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 669 | "requires": { 670 | "ms": "2.0.0" 671 | } 672 | }, 673 | "depd": { 674 | "version": "2.0.0", 675 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 676 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" 677 | }, 678 | "destroy": { 679 | "version": "1.2.0", 680 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 681 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" 682 | }, 683 | "ee-first": { 684 | "version": "1.1.1", 685 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 686 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" 687 | }, 688 | "encodeurl": { 689 | "version": "1.0.2", 690 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 691 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" 692 | }, 693 | "escape-html": { 694 | "version": "1.0.3", 695 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 696 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" 697 | }, 698 | "etag": { 699 | "version": "1.8.1", 700 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 701 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" 702 | }, 703 | "express": { 704 | "version": "4.18.2", 705 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", 706 | "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", 707 | "requires": { 708 | "accepts": "~1.3.8", 709 | "array-flatten": "1.1.1", 710 | "body-parser": "1.20.1", 711 | "content-disposition": "0.5.4", 712 | "content-type": "~1.0.4", 713 | "cookie": "0.5.0", 714 | "cookie-signature": "1.0.6", 715 | "debug": "2.6.9", 716 | "depd": "2.0.0", 717 | "encodeurl": "~1.0.2", 718 | "escape-html": "~1.0.3", 719 | "etag": "~1.8.1", 720 | "finalhandler": "1.2.0", 721 | "fresh": "0.5.2", 722 | "http-errors": "2.0.0", 723 | "merge-descriptors": "1.0.1", 724 | "methods": "~1.1.2", 725 | "on-finished": "2.4.1", 726 | "parseurl": "~1.3.3", 727 | "path-to-regexp": "0.1.7", 728 | "proxy-addr": "~2.0.7", 729 | "qs": "6.11.0", 730 | "range-parser": "~1.2.1", 731 | "safe-buffer": "5.2.1", 732 | "send": "0.18.0", 733 | "serve-static": "1.15.0", 734 | "setprototypeof": "1.2.0", 735 | "statuses": "2.0.1", 736 | "type-is": "~1.6.18", 737 | "utils-merge": "1.0.1", 738 | "vary": "~1.1.2" 739 | } 740 | }, 741 | "finalhandler": { 742 | "version": "1.2.0", 743 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", 744 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", 745 | "requires": { 746 | "debug": "2.6.9", 747 | "encodeurl": "~1.0.2", 748 | "escape-html": "~1.0.3", 749 | "on-finished": "2.4.1", 750 | "parseurl": "~1.3.3", 751 | "statuses": "2.0.1", 752 | "unpipe": "~1.0.0" 753 | } 754 | }, 755 | "forwarded": { 756 | "version": "0.2.0", 757 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 758 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" 759 | }, 760 | "fresh": { 761 | "version": "0.5.2", 762 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 763 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" 764 | }, 765 | "function-bind": { 766 | "version": "1.1.1", 767 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 768 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" 769 | }, 770 | "get-intrinsic": { 771 | "version": "1.1.3", 772 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", 773 | "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", 774 | "requires": { 775 | "function-bind": "^1.1.1", 776 | "has": "^1.0.3", 777 | "has-symbols": "^1.0.3" 778 | } 779 | }, 780 | "has": { 781 | "version": "1.0.3", 782 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 783 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 784 | "requires": { 785 | "function-bind": "^1.1.1" 786 | } 787 | }, 788 | "has-symbols": { 789 | "version": "1.0.3", 790 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 791 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" 792 | }, 793 | "http-errors": { 794 | "version": "2.0.0", 795 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 796 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 797 | "requires": { 798 | "depd": "2.0.0", 799 | "inherits": "2.0.4", 800 | "setprototypeof": "1.2.0", 801 | "statuses": "2.0.1", 802 | "toidentifier": "1.0.1" 803 | } 804 | }, 805 | "iconv-lite": { 806 | "version": "0.4.24", 807 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 808 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 809 | "requires": { 810 | "safer-buffer": ">= 2.1.2 < 3" 811 | } 812 | }, 813 | "inherits": { 814 | "version": "2.0.4", 815 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 816 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 817 | }, 818 | "ipaddr.js": { 819 | "version": "1.9.1", 820 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 821 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" 822 | }, 823 | "lodash": { 824 | "version": "4.17.21", 825 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 826 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" 827 | }, 828 | "media-typer": { 829 | "version": "0.3.0", 830 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 831 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" 832 | }, 833 | "merge-descriptors": { 834 | "version": "1.0.1", 835 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 836 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" 837 | }, 838 | "methods": { 839 | "version": "1.1.2", 840 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 841 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" 842 | }, 843 | "mime": { 844 | "version": "1.6.0", 845 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 846 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 847 | }, 848 | "mime-db": { 849 | "version": "1.52.0", 850 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 851 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" 852 | }, 853 | "mime-types": { 854 | "version": "2.1.35", 855 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 856 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 857 | "requires": { 858 | "mime-db": "1.52.0" 859 | } 860 | }, 861 | "ms": { 862 | "version": "2.0.0", 863 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 864 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 865 | }, 866 | "negotiator": { 867 | "version": "0.6.3", 868 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 869 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" 870 | }, 871 | "object-inspect": { 872 | "version": "1.12.2", 873 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", 874 | "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" 875 | }, 876 | "on-finished": { 877 | "version": "2.4.1", 878 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 879 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 880 | "requires": { 881 | "ee-first": "1.1.1" 882 | } 883 | }, 884 | "parseurl": { 885 | "version": "1.3.3", 886 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 887 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 888 | }, 889 | "path-to-regexp": { 890 | "version": "0.1.7", 891 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 892 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" 893 | }, 894 | "proxy-addr": { 895 | "version": "2.0.7", 896 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 897 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 898 | "requires": { 899 | "forwarded": "0.2.0", 900 | "ipaddr.js": "1.9.1" 901 | } 902 | }, 903 | "qs": { 904 | "version": "6.11.0", 905 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", 906 | "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", 907 | "requires": { 908 | "side-channel": "^1.0.4" 909 | } 910 | }, 911 | "range-parser": { 912 | "version": "1.2.1", 913 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 914 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 915 | }, 916 | "raw-body": { 917 | "version": "2.5.1", 918 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", 919 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", 920 | "requires": { 921 | "bytes": "3.1.2", 922 | "http-errors": "2.0.0", 923 | "iconv-lite": "0.4.24", 924 | "unpipe": "1.0.0" 925 | } 926 | }, 927 | "safe-buffer": { 928 | "version": "5.2.1", 929 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 930 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" 931 | }, 932 | "safer-buffer": { 933 | "version": "2.1.2", 934 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 935 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 936 | }, 937 | "send": { 938 | "version": "0.18.0", 939 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", 940 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", 941 | "requires": { 942 | "debug": "2.6.9", 943 | "depd": "2.0.0", 944 | "destroy": "1.2.0", 945 | "encodeurl": "~1.0.2", 946 | "escape-html": "~1.0.3", 947 | "etag": "~1.8.1", 948 | "fresh": "0.5.2", 949 | "http-errors": "2.0.0", 950 | "mime": "1.6.0", 951 | "ms": "2.1.3", 952 | "on-finished": "2.4.1", 953 | "range-parser": "~1.2.1", 954 | "statuses": "2.0.1" 955 | }, 956 | "dependencies": { 957 | "ms": { 958 | "version": "2.1.3", 959 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 960 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 961 | } 962 | } 963 | }, 964 | "serve-static": { 965 | "version": "1.15.0", 966 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", 967 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", 968 | "requires": { 969 | "encodeurl": "~1.0.2", 970 | "escape-html": "~1.0.3", 971 | "parseurl": "~1.3.3", 972 | "send": "0.18.0" 973 | } 974 | }, 975 | "setprototypeof": { 976 | "version": "1.2.0", 977 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 978 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" 979 | }, 980 | "side-channel": { 981 | "version": "1.0.4", 982 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 983 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 984 | "requires": { 985 | "call-bind": "^1.0.0", 986 | "get-intrinsic": "^1.0.2", 987 | "object-inspect": "^1.9.0" 988 | } 989 | }, 990 | "statuses": { 991 | "version": "2.0.1", 992 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 993 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" 994 | }, 995 | "toidentifier": { 996 | "version": "1.0.1", 997 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 998 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" 999 | }, 1000 | "type-is": { 1001 | "version": "1.6.18", 1002 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 1003 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1004 | "requires": { 1005 | "media-typer": "0.3.0", 1006 | "mime-types": "~2.1.24" 1007 | } 1008 | }, 1009 | "unpipe": { 1010 | "version": "1.0.0", 1011 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1012 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" 1013 | }, 1014 | "utils-merge": { 1015 | "version": "1.0.1", 1016 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1017 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" 1018 | }, 1019 | "vary": { 1020 | "version": "1.1.2", 1021 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1022 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" 1023 | } 1024 | } 1025 | } 1026 | -------------------------------------------------------------------------------- /POC/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "express": "^4.18.2", 4 | "lodash": "^4.17.21" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /POC/server.js: -------------------------------------------------------------------------------- 1 | //creating server with nodejs 2 | 3 | //http module 4 | 5 | const http = require("http"); 6 | const fs = require('fs'); 7 | const _ = require('lodash'); 8 | const server = http.createServer((req, res) => { 9 | console.log("request from browser to server"); 10 | // console.log(req.method) 11 | // console.log(req.url) 12 | res.setHeader('Content-Type', 'text/html'); 13 | // res.write("

Hello World

"); 14 | // res.write("

I am ready for you

"); 15 | // res.end("

Testing res.end

"); 16 | //using lodash 17 | let greet = _.once(() => { 18 | console.log("How are you?"); 19 | }); 20 | 21 | greet(); 22 | greet(); 23 | let path = './views'; 24 | switch (req.url) { 25 | case "/": 26 | path += "/index.html"; 27 | res.statusCode = 200; 28 | break; 29 | case "/about": 30 | path += "/about.html"; 31 | res.statusCode = 200; 32 | break; 33 | case "/aboutus": 34 | res.statusCode = 301; 35 | res.setHeader('Location','/about') 36 | res.end(); 37 | break; 38 | default: 39 | path += "/404.html"; 40 | res.statusCode = 404; 41 | break; 42 | } 43 | fs.readFile(path, (err, file) => { 44 | if (err) { 45 | console.log(err); 46 | } 47 | else { 48 | res.write(file); 49 | res.end(); 50 | } 51 | }) 52 | 53 | }); 54 | //port number, host name , cb 55 | server.listen(3000, 'localhost', () => { 56 | console.log("server is listening on port 3000"); 57 | }); 58 | 59 | 60 | -------------------------------------------------------------------------------- /POC/views/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/POC/views/.DS_Store -------------------------------------------------------------------------------- /POC/views/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 |

OOPS page not found

11 | 12 | -------------------------------------------------------------------------------- /POC/views/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 |

About Page

11 | 12 | -------------------------------------------------------------------------------- /POC/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 |

Hello World

11 |

I am ready for you

12 | 13 | -------------------------------------------------------------------------------- /Routers/bookingRouter.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const bookingRouter = express.Router(); 3 | const { protectRoute } = require('../helper'); 4 | const { createSession } = require('../controller/bookingController'); 5 | bookingRouter.use(express.static("public")); 6 | bookingRouter.route('/createSession').get(function (req, res) { 7 | res.sendFile("/Users/abhishekgoel/backend/public/index.html"); 8 | }); 9 | // bookingRouter.use(protectRoute); 10 | bookingRouter.route('/createSession').post(createSession); 11 | 12 | module.exports = bookingRouter; 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Routers/planRouter.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const { protectRoute, isAuthorised } = require('../helper'); 3 | const planRouter = express.Router(); 4 | const { getAllPlans, getPlan, createPlan, updatePlan, deletePlan, top3Plans } = require('../controller/planController'); 5 | 6 | planRouter 7 | .route('/all') 8 | .get(getAllPlans); 9 | 10 | planRouter 11 | .route('/top3') 12 | .get(top3Plans) 13 | 14 | planRouter.use(protectRoute) //logged in hai ya nhi 15 | planRouter 16 | .route('single/:id') 17 | .get(getPlan) 18 | 19 | planRouter.use(isAuthorised(['admin', 'restaurantowner'])) // logged in , lekin role 20 | planRouter 21 | .route("/crud") 22 | .post(createPlan); 23 | 24 | planRouter 25 | .route('/crud/:id') 26 | .patch(updatePlan) 27 | .delete(deletePlan) 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | module.exports = planRouter; -------------------------------------------------------------------------------- /Routers/reviewRouter.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const reviewRouter = express.Router(); 3 | const { isAuthorised, protectRoute } = require('../helper'); 4 | const { getAllReviews, top3Review, getPlanReview, createReview, updateReview, deleteReview } = require("../controller/reviewController"); 5 | 6 | reviewRouter 7 | .route("/all") 8 | .get(getAllReviews); 9 | 10 | reviewRouter 11 | .route("/top3") 12 | .get(top3Review); 13 | 14 | 15 | reviewRouter.use(protectRoute) 16 | reviewRouter 17 | .route("/crud/:plan") 18 | .post(createReview) 19 | .patch(updateReview) 20 | .delete(deleteReview) 21 | 22 | //all reviews of a particular plan 23 | reviewRouter 24 | .route("/:id") 25 | .get(getPlanReview); 26 | 27 | module.exports = reviewRouter; -------------------------------------------------------------------------------- /Routers/userRouter.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const userRouter = express.Router(); 3 | const { 4 | getUser, 5 | postUser, 6 | updateUser, 7 | deleteUser, 8 | allUser, 9 | } = require("../controller/userController"); 10 | const {isAuthorised,protectRoute} = require('../helper'); 11 | const { signup, login, forgetpassword, resetpassword, logout } = require('../controller/authController'); 12 | 13 | //user ke options 14 | userRouter 15 | .route('/:id') 16 | .patch(updateUser) 17 | .delete(deleteUser) 18 | 19 | userRouter 20 | .route("/login") 21 | .post(login); 22 | 23 | userRouter 24 | .route("/signup") 25 | .post(signup); 26 | 27 | userRouter 28 | .route("/forgetpassword") 29 | .post(forgetpassword); 30 | 31 | userRouter 32 | .route("/resetpassword/:token") 33 | .post(resetpassword); 34 | 35 | userRouter 36 | .route("/logout") 37 | .get(logout); 38 | 39 | //profile page 40 | userRouter.use(protectRoute) 41 | userRouter 42 | .route('/profile') 43 | .get(getUser) 44 | 45 | //admin specific function 46 | userRouter.use(isAuthorised(['admin'])); 47 | userRouter.route("/").get(allUser); 48 | 49 | 50 | module.exports = userRouter; 51 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const app = express(); 3 | var cors = require('cors'); 4 | app.use(cors()); 5 | app.use(express.static('public/build')); 6 | const cookieParser = require("cookie-parser"); 7 | 8 | app.use(express.json()); 9 | app.use(cookieParser()); 10 | 11 | const userRouter = require('./Routers/userRouter'); 12 | const planRouter = require("./Routers/planRouter"); 13 | const reviewRouter = require("./Routers/reviewRouter"); 14 | const bookingRouter = require("./Routers/bookingRouter"); 15 | 16 | app.use("/user", userRouter); 17 | app.use("/plan", planRouter); 18 | app.use("/review", reviewRouter); 19 | app.use('/booking', bookingRouter); 20 | 21 | const port = process.env.PORT || 5000; 22 | app.listen(port); -------------------------------------------------------------------------------- /classNotes/031222 1224 PM.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/classNotes/031222 1224 PM.pdf -------------------------------------------------------------------------------- /classNotes/101122 913 PM.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/classNotes/101122 913 PM.pdf -------------------------------------------------------------------------------- /classNotes/131122 1003 AM.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/classNotes/131122 1003 AM.pdf -------------------------------------------------------------------------------- /classNotes/151122 916 PM.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/classNotes/151122 916 PM.pdf -------------------------------------------------------------------------------- /classNotes/171122 922 PM.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/classNotes/171122 922 PM.pdf -------------------------------------------------------------------------------- /classNotes/191122 1025 AM.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/classNotes/191122 1025 AM.pdf -------------------------------------------------------------------------------- /classNotes/201122 216 PM.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/classNotes/201122 216 PM.pdf -------------------------------------------------------------------------------- /classNotes/221122 917 PM.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/classNotes/221122 917 PM.pdf -------------------------------------------------------------------------------- /classNotes/241122 921 PM.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/classNotes/241122 921 PM.pdf -------------------------------------------------------------------------------- /classNotes/261122 1016 AM.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/classNotes/261122 1016 AM.pdf -------------------------------------------------------------------------------- /classNotes/271122 1033 AM.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/classNotes/271122 1033 AM.pdf -------------------------------------------------------------------------------- /controller/authController.js: -------------------------------------------------------------------------------- 1 | const userModel = require("../models/userModel"); 2 | var jwt = require("jsonwebtoken"); 3 | const { JWT_KEY } = require('../secrets'); 4 | 5 | console.log("1234 ", JWT_KEY); 6 | const { sendMail } = require('../utility/nodemailer') 7 | 8 | module.exports.signup=async function (req, res) { 9 | try { 10 | let data = req.body; //nep 11 | let user = await userModel.create(data); 12 | if (user) { 13 | //send mail 14 | await sendMail("signup",user) 15 | res.json({ 16 | msg: "user signed up", 17 | user, 18 | }); 19 | } 20 | else { 21 | res.json({ 22 | msg: "user could not be signed up" 23 | }); 24 | } 25 | } catch (err) { 26 | res.json({ 27 | err: err.message, 28 | }); 29 | } 30 | } 31 | 32 | module.exports.login=async function (req, res) { 33 | try { 34 | let { email, password } = req.body; 35 | let user = await userModel.findOne({ email: email }); 36 | if (user) { 37 | //check if password matches 38 | //bcrypt - compare 39 | if (password == user.password) { 40 | let uid = user["_id"]; 41 | var token = jwt.sign({ payload: uid }, JWT_KEY); 42 | res.cookie("login", token); 43 | res.json({ 44 | msg: "user logged in", 45 | }); 46 | } else { 47 | res.json({ 48 | msg: "wrong credentials", 49 | }); 50 | } 51 | } else { 52 | res.json({ 53 | msg: "user not found", 54 | }); 55 | } 56 | } catch (err) { 57 | res.json({ 58 | msg: err.message, 59 | }); 60 | } 61 | } 62 | 63 | module.exports.forgetpassword = async function (req, res) { 64 | try { 65 | let { email } = req.body; 66 | const user = await userModel.findOne({ email: email }); 67 | if (user) { 68 | //resetToken 69 | const resetToken = await user.createResetToken(); 70 | //create link 71 | //https://xyz.com/resetPassword/resetToken 72 | let resetPasswordLink = `${req.protocol}://${req.get('host')}/user/resetpassword/${resetToken}`; 73 | //send email to user 74 | //nodemailer 75 | await sendMail("forgetpassword", { email, resetPasswordLink }); 76 | 77 | res.json({ 78 | msg:"email sent successfully" 79 | }) 80 | } 81 | else { 82 | res.json({ 83 | msg:'user not found' 84 | }) 85 | } 86 | } 87 | catch (err) { 88 | res.status(500).json({ 89 | msg: err.message 90 | }); 91 | } 92 | } 93 | 94 | module.exports.resetpassword = async function (req, res) { 95 | try { 96 | const token = req.params.token; 97 | console.log("0987",token); 98 | let { password, confirmPassword } = req.body; 99 | const user = await userModel.findOne({ resetToken: token }); 100 | if (user) { 101 | //resetPasswordHandler will update user in db 102 | user.resetPasswordHandler(password, confirmPassword); 103 | await user.save(); 104 | res.json({ 105 | msg: "password chnaged succesfully", 106 | }); 107 | } 108 | else{ 109 | res.json({ 110 | msg: "user not found", 111 | }); 112 | } 113 | 114 | } 115 | catch (err) { 116 | res.json({ 117 | msg:err.message 118 | }) 119 | } 120 | } 121 | 122 | module.exports.logout = function (req,res) { 123 | res.cookie('login', ' ', { maxAge: 1 }); 124 | res.json({ 125 | msg:'user logged out successfully' 126 | }) 127 | } 128 | 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /controller/bookingController.js: -------------------------------------------------------------------------------- 1 | let SK = "sk_test_pL1X84CZrOSOYRkyyvKuCwR000a36t5jwK"; 2 | const stripe = require('stripe')(SK); 3 | const planModel=require("../models/planModel") 4 | const userModel = require("../models/userModel") 5 | 6 | module.exports.createSession = async function (req, res) { 7 | try { 8 | // let userId = req.id; 9 | // let planId = req.params.id; 10 | 11 | // const user = await userModel.findById(userId); 12 | // const plan = await planModel.findById(planId); 13 | 14 | const session = await stripe.checkout.sessions.create({ 15 | // payment_method_type: ["card"], 16 | // customer_email: user.email, 17 | // client_reference_id: plan.id, 18 | line_items: [ 19 | { 20 | // Provide the exact Price ID (for example, pr_1234) of the product you want to sell 21 | name: plan.name, 22 | // name: "HealthyFood101", 23 | // description: plan.description, 24 | // description: "get yourself in shape", 25 | // price: plan.price * 100, 26 | amount:"1234", 27 | currency: "inr", 28 | quantity: 1, 29 | }, 30 | ], 31 | mode: "payment", 32 | success_url: `${req.protocol}://${req.get("host")}/profile`, 33 | cancel_url: `${req.protocol}://${req.get("host")}/profile`, 34 | }); 35 | // res.json({ 36 | // msg: "success", 37 | // session 38 | // }); 39 | res.redirect(303, session.url); 40 | } 41 | catch (err) { 42 | res.json({ 43 | err:err.message 44 | }) 45 | } 46 | } -------------------------------------------------------------------------------- /controller/planController.js: -------------------------------------------------------------------------------- 1 | const planModel = require("../models/planModel"); 2 | 3 | module.exports.getAllPlans = async function (req, res) { 4 | try { 5 | let plans = await planModel.find(); 6 | if (plans) { 7 | return res.json({ 8 | msg: "all plans retrieved", 9 | data: plans, 10 | }); 11 | } else { 12 | //return with apt status code 13 | return res.json({ 14 | msg: "plans not found", 15 | }); 16 | } 17 | } catch (err) { 18 | res.json({ 19 | msg: err.message, 20 | }); 21 | } 22 | }; 23 | 24 | module.exports.getPlan = async function (req, res) { 25 | try { 26 | let id = req.params.id; 27 | let plan = await planModel.findById(id); 28 | if (plan) { 29 | return res.json({ 30 | msg: "plan retrieved", 31 | data: plan, 32 | }); 33 | } else { 34 | //return with apt status code 35 | return res.json({ 36 | msg: "plan not found", 37 | }); 38 | } 39 | } catch (err) { 40 | res.json({ 41 | msg: err.message, 42 | }); 43 | } 44 | }; 45 | 46 | module.exports.createPlan = async function (req, res) { 47 | try { 48 | let plan = req.body; 49 | let createdPlan = await planModel.create(plan); 50 | return res.json({ 51 | msg: "plan created succesfully", 52 | createdPlan, 53 | }); 54 | } catch (err) { 55 | res.json({ 56 | msg: err.message, 57 | }); 58 | } 59 | }; 60 | 61 | module.exports.updatePlan = async function (req, res) { 62 | try { 63 | let id = req.params.id; 64 | console.log("qwerty -> ", id); 65 | let dataToBeUpdated = req.body; 66 | let keys = []; 67 | for (let key in dataToBeUpdated) { 68 | keys.push(key); 69 | } 70 | let plan = await planModel.findById(id); 71 | for (let i = 0; i < keys.length; i++) { 72 | plan[keys[i]] = dataToBeUpdated[keys[i]]; 73 | } 74 | await plan.save(); 75 | return res.json({ 76 | msg: "plan updated succesfully", 77 | plan, 78 | }); 79 | } catch (err) { 80 | res.json({ 81 | msg: err.message, 82 | }); 83 | } 84 | }; 85 | 86 | module.exports.deletePlan = async function (req, res) { 87 | try { 88 | let id = req.params.id; 89 | let deletedPlan = await planModel.findByIdAndDelete(id); 90 | return res.json({ 91 | msg: "plan deleted succesfully", 92 | deletedPlan, 93 | }); 94 | } catch (err) { 95 | res.json({ 96 | msg: err.message, 97 | }); 98 | } 99 | }; 100 | 101 | module.exports.top3Plans = async function (req, res) { 102 | try { 103 | const plans = await planModel.find().sort({ ratingsAverage: -1 }).limit(3); 104 | return res.json({ 105 | msg: "top3 plans", 106 | data:plans 107 | }) 108 | } 109 | catch (err) { 110 | res.json({ 111 | msg:err.message 112 | }) 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /controller/reviewController.js: -------------------------------------------------------------------------------- 1 | const planModel = require("../models/planModel"); 2 | const reviewModel = require("../models/reviewModel"); 3 | 4 | module.exports.getAllReviews = async function (req, res) { 5 | try { 6 | const reviews = await reviewModel.find(); 7 | if (reviews) { 8 | return res.json({ 9 | msg: "review retrieved", 10 | reviews, 11 | }); 12 | } else { 13 | return res.json({ 14 | msg: "reviews not found", 15 | }); 16 | } 17 | } catch (err) { 18 | res.json({ 19 | msg: err.message, 20 | }); 21 | } 22 | }; 23 | 24 | module.exports.top3Review = async function (req, res) { 25 | try { 26 | const top3 = await reviewModel.find().sort({ rating: -1 }).limit(3); 27 | if (top3) { 28 | return res.json({ 29 | msg: "review retrieved", 30 | top3, 31 | }); 32 | } else { 33 | return res.json({ 34 | msg: "reviews not found", 35 | }); 36 | } 37 | } catch (err) { 38 | res.json({ 39 | msg: err.message, 40 | }); 41 | } 42 | }; 43 | 44 | module.exports.getPlanReview = async function (req, res) { 45 | try { 46 | const planId = req.params.id; 47 | let reviews = await reviewModel.find(); 48 | reviews = reviews.filter(review => review.plan["_id"] == planId); 49 | if (reviews) { 50 | return res.json({ 51 | msg: "reviews retrieved", 52 | reviews, 53 | }); 54 | } else { 55 | return res.json({ 56 | msg: "reviews not found", 57 | }); 58 | } 59 | } catch (err) { 60 | res.json({ 61 | msg: err.message, 62 | }); 63 | } 64 | }; 65 | 66 | module.exports.createReview = async function (req, res) { 67 | try { 68 | const planId = req.params.plan; 69 | const plan = await planModel.findById(planId); 70 | const review = req.body; 71 | const postReview = await reviewModel.create(review); 72 | // plan.ratingsAverage = 73 | // (plan.ratingsAverage * plan.nor + req.body.rating) / (plan.nor + 1); 74 | // plan.nor += 1; 75 | // await plan.save(); 76 | await postReview.save(); 77 | 78 | return res.json({ 79 | msg: "review posted", 80 | postReview, 81 | }); 82 | } catch (err) { 83 | res.status(500).json({ 84 | msg: err.message, 85 | }); 86 | } 87 | }; 88 | 89 | module.exports.updateReview = async function (req, res) { 90 | try { 91 | let planId = req.params.plan; //which plan's review is being updated 92 | let id = req.body.id; //which review needs to be updated 93 | let dataToBeUpdated = req.body; 94 | let keys = []; 95 | for (let key in dataToBeUpdated) { 96 | if (key == id) continue; 97 | keys.push(key); 98 | } 99 | // key.include("rating") 100 | //use review's rating to calculate avg rating and update in plan 101 | let review = await reviewModel.findById(id); 102 | for (let i = 0; i < keys.length; i++){ 103 | review[keys[i]] = dataToBeUpdated[keys[i]]; 104 | } 105 | await review.save(); 106 | return res.json({ 107 | message: "plan updated succesfully", 108 | review 109 | }) 110 | } 111 | catch (err) { 112 | return res.json({ 113 | msg:err.message 114 | }) 115 | } 116 | } 117 | 118 | module.exports.deleteReview = async function (req, res) { 119 | try { 120 | let planId = req.params.plan; 121 | let id = req.body.id; 122 | //change avg rating of plan 123 | let review = await reviewModel.findByIdAndDelete(id); 124 | res.json({ 125 | message: "review deleted" 126 | }) 127 | } 128 | catch (err) { 129 | return res.json({ 130 | msg:err.message 131 | }) 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /controller/userController.js: -------------------------------------------------------------------------------- 1 | const userModel = require("../models/userModel"); 2 | 3 | module.exports.getUser = async function (req, res) { 4 | try { 5 | let id = req.id; 6 | let user = await userModel.findById(id); 7 | 8 | res.json({ msg: "users retrieved", user }); 9 | } catch (err) { 10 | res.json({ 11 | msg: err.message, 12 | }); 13 | } 14 | }; 15 | 16 | // module.exports.postUser=function (req, res) { 17 | // console.log(req.body.Name); 18 | // //then i can put this in db 19 | // user.push(req.body); 20 | // res.json({ 21 | // message: "Data received successfully", 22 | // user: req.body, 23 | // }); 24 | // } 25 | 26 | module.exports.updateUser = async function (req, res) { 27 | console.log(req.body); 28 | let id = req.params.id; 29 | let user = await userModel.findById(id); 30 | let dataToBeUpdated = req.body; 31 | // { 32 | // name: "Abhi", 33 | // email: 'abc@gmail.com' 34 | // } 35 | try { 36 | if (user) { 37 | const keys = []; //['name','email] 38 | for (let key in dataToBeUpdated) { 39 | keys.push(key); 40 | } 41 | 42 | for (let i = 0; i < keys.length; i++) { 43 | user[keys[i]] = dataToBeUpdated[keys[i]]; 44 | //name=Abhi 45 | } 46 | console.log("abcd ",user); 47 | 48 | const updatedData = await user.save(); 49 | res.json({ 50 | message: "data updated succesfully", 51 | updatedData, 52 | }); 53 | } else { 54 | res.json({ 55 | message: "user not found", 56 | }); 57 | } 58 | } catch (err) { 59 | res.json({ 60 | message: err.message, 61 | }); 62 | } 63 | }; 64 | 65 | module.exports.deleteUser = async function (req, res) { 66 | try { 67 | let id = req.params.id; 68 | // let doc = await userModel.deleteOne({ email: "abcd@gmail.com" }); 69 | // let doc = await userModel.findOneAndRemove({ email: "abcde@gmail.com" }); 70 | let user = await userModel.findByIdAndDelete(id); 71 | res.json({ 72 | msg: "user has been deleted", 73 | user, 74 | }); 75 | } catch (err) { 76 | res.json({ 77 | msg: err.message, 78 | }); 79 | } 80 | }; 81 | 82 | module.exports.allUser = async function (req, res) { 83 | try { 84 | let allUsers = await userModel.find(); 85 | res.json({ 86 | msg: "user id is ", 87 | allUsers, 88 | }); 89 | } catch (err) { 90 | res.json({ 91 | msg: err.message, 92 | }); 93 | } 94 | }; 95 | -------------------------------------------------------------------------------- /helper.js: -------------------------------------------------------------------------------- 1 | var jwt = require("jsonwebtoken"); 2 | const userModel = require("./models/userModel"); 3 | const { JWT_KEY } = require("./secrets"); 4 | 5 | //protectRoute 6 | module.exports.protectRoute = async function (req, res, next) { 7 | let token; 8 | if (req.cookies.login) { 9 | token = req.cookies.login; 10 | let payloadObj = jwt.verify(token, JWT_KEY); 11 | const user = await userModel.findById(payloadObj.payload); 12 | req.id = user.id; 13 | req.role = user.role; 14 | if (payloadObj) next(); 15 | else { 16 | req.json({ 17 | msg: "user not verified", 18 | }); 19 | } 20 | } else { 21 | return res.json({ 22 | msg: "opertion not allowed", 23 | }); 24 | } 25 | }; 26 | 27 | //isAutorised-? check the user's role 28 | // client will send role key in req obj 29 | module.exports.isAuthorised = function (roles) { 30 | return function (req, res, next) { 31 | let role = req.role; 32 | if (roles.includes(role)) { 33 | next(); 34 | } 35 | else { 36 | res.status(401).json({ 37 | msg: "role invalid", 38 | }); 39 | } 40 | }; 41 | }; 42 | -------------------------------------------------------------------------------- /homework.md: -------------------------------------------------------------------------------- 1 | 13/11/22 2 | 3 | https://medium.com/dlt-labs-publication/package-json-vs-package-lock-json-c8d5deba12cb 4 | 5 | 17/11/22 6 | 7 | https://mongoosejs.com/docs/queries.html 8 | 9 | https://www.w3schools.com/tags/ref_urlencode.ASP#:~:text=URL%20Encoding%20(Percent%20Encoding),into%20a%20valid%20ASCII%20format. 10 | 11 | https://expressjs.com/en/guide/using-middleware.html 12 | 13 | disclaimer: read only when comfortable with backend 14 | 15 | https://itnext.io/setup-logger-for-node-express-app-9ef4e8f73dac 16 | 17 | JEST - testing library for react 18 | 19 | 19/11/22 20 | 21 | https://mongoosejs.com/docs/middleware.html#pre 22 | https://www.npmjs.com/package/bcrypt?activeTab=readme 23 | 24 | https://www.youtube.com/watch?v=j4rlFpaKq-M&list=PL-Jc9J83PIiEnK1q9tuVrrORqKBexcE_J&index=41 25 | 26 | https://medium.com/@electra_chong/what-is-cors-what-is-it-used-for-308cafa4df1a 27 | 28 | https://www.youtube.com/watch?v=xRHLcGvZPrQ&list=PL-Jc9J83PIiEnK1q9tuVrrORqKBexcE_J&index=43 29 | -------------------------------------------------------------------------------- /models/planModel.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | const { db_link } = require("../secrets"); 3 | mongoose 4 | .connect(db_link) 5 | .then(function (db) { 6 | console.log("plan db connected"); 7 | // console.log(db); 8 | }) 9 | .catch(function (err) { 10 | console.log(err); 11 | }); 12 | 13 | const planSchema = mongoose.Schema({ 14 | name: { 15 | type: String, 16 | required: true, 17 | unique: true, 18 | maxLength: [20, `plan name should not exceed 20 characters`] 19 | }, 20 | duration: { 21 | type: Number, 22 | required: true 23 | }, 24 | price: { 25 | type: Number, 26 | required: [true, 'price not entered'] 27 | }, 28 | discount: { 29 | type: Number, 30 | validate: [function () { 31 | return this.discount < 100 32 | }, 'discount cannot be 100%'] 33 | }, 34 | ratingsAverage: { 35 | type: Number, 36 | // default:0 37 | }, 38 | // nor: { 39 | // type: Number, 40 | // default:0 41 | // } 42 | }); 43 | 44 | const planModel = mongoose.model("planModel", planSchema); 45 | module.exports = planModel; 46 | 47 | // (async function createPlan() { 48 | // let plan = { 49 | // name: "Superfood", 50 | // duration: 3, 51 | // price:'', 52 | // ratingsAverage: 3.8, 53 | // discount: 100 54 | // } 55 | // let data = await planModel.create(plan); 56 | // console.log(data); 57 | // // const doc = new planModel(plan); 58 | // // await doc.save(); 59 | // })(); 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /models/reviewModel.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | const { db_link } = require("../secrets"); 3 | mongoose 4 | .connect(db_link) 5 | .then(function (db) { 6 | console.log("review db connected"); 7 | }) 8 | .catch(function (err) { 9 | console.log(err); 10 | }); 11 | 12 | const reviewSchema = new mongoose.Schema({ 13 | review: { 14 | type: String, 15 | require: [true, "review is required"], 16 | }, 17 | rating: { 18 | type: Number, 19 | min: 1, 20 | max: 5, 21 | required: [true, "rating is required"], 22 | }, 23 | createdAt: { 24 | type: Date, 25 | default: Date.now(), 26 | }, 27 | user: { 28 | type: mongoose.Schema.ObjectId, 29 | ref: "userModel", 30 | required: [true, "review must belong to a user"], 31 | }, 32 | plan: { 33 | type: mongoose.Schema.ObjectId, 34 | ref: "planModel", 35 | required: [true, "plan must belong to a user"], 36 | }, 37 | }); 38 | 39 | //find findbyid, findone , findoneandupdate 40 | reviewSchema.pre(/^find/, function (next) { 41 | this.populate({ 42 | path: "user", 43 | select: "name profileImage", 44 | }).populate("plan"); 45 | next(); 46 | }); 47 | 48 | const reviewModel = mongoose.model("reviewModel", reviewSchema); 49 | 50 | module.exports = reviewModel; 51 | -------------------------------------------------------------------------------- /models/userModel.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose"); 2 | const { db_link } = require("../secrets"); 3 | const emailValidator = require("email-validator"); 4 | const bcrypt = require('bcrypt'); 5 | const { v4: uuidv4 } = require("uuid"); 6 | mongoose 7 | .connect(db_link) 8 | .then(function (db) { 9 | console.log("user db connected"); 10 | // console.log(db); 11 | }) 12 | .catch(function (err) { 13 | console.log(err); 14 | }); 15 | 16 | const userSchema = mongoose.Schema({ 17 | name: { 18 | type: String, 19 | required: true, 20 | }, 21 | email: { 22 | type: String, 23 | required: true, 24 | unique: true, 25 | validate: function () { 26 | return emailValidator.validate(this.email); 27 | }, 28 | }, 29 | password: { 30 | type: String, 31 | required: true, 32 | minLength: 7, 33 | }, 34 | confirmPassword: { 35 | type: String, 36 | // required: true, 37 | minLength: 7, 38 | validate: function () { 39 | return this.confirmPassword == this.password; 40 | }, 41 | }, 42 | role: { 43 | type: String, 44 | enum: ['admin', 'user', 'restaurantowner', 'deliveryboy'], 45 | default:'user' 46 | }, 47 | profileImage: { 48 | type: String, 49 | default:'img/users/default.jpg' 50 | }, 51 | resetToken: { type: String } 52 | 53 | }); 54 | 55 | //-------------->learning hooks<----------------- 56 | // userSchema.pre('save', function () { 57 | // console.log("before saving in db"); 58 | // }) 59 | 60 | // userSchema.post("save", function () { 61 | // console.log("after saving in db"); 62 | // }); 63 | 64 | userSchema.pre("save", function () { 65 | // console.log("before saving in db"); 66 | this.confirmPassword = undefined; 67 | }); 68 | 69 | // userSchema.pre('save', async function () { 70 | // let salt = await bcrypt.genSalt(); 71 | // console.log(salt); 72 | // let hashedString = await bcrypt.hash(this.password, salt); 73 | // this.password = hashedString; 74 | // // console.log(hashedString); 75 | // }) 76 | 77 | userSchema.methods.createResetToken = async function () { 78 | const resetToken = uuidv4(); 79 | this.resetToken = resetToken; 80 | // this.confirmPassword = this.password; 81 | await this.save(); 82 | return resetToken; 83 | }; 84 | 85 | userSchema.methods.resetPasswordHandler = function (password, confirmPassword) { 86 | this.password = password; 87 | this.confirmPassword = confirmPassword; 88 | this.resetToken = undefined; 89 | }; 90 | 91 | 92 | 93 | 94 | 95 | 96 | //models 97 | const userModel = mongoose.model("userModel", userSchema); 98 | module.exports = userModel; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "bcrypt": "^5.1.0", 4 | "cookie-parser": "^1.4.6", 5 | "cors": "^2.8.5", 6 | "email-validator": "^2.0.4", 7 | "express": "^4.18.2", 8 | "jsonwebtoken": "^8.5.1", 9 | "mongoose": "^6.7.2", 10 | "nodemailer": "^6.8.0", 11 | "stripe": "^11.1.0", 12 | "uuid": "^9.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /public/build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": { 3 | "main.css": "/static/css/main.667c8ed4.chunk.css", 4 | "main.js": "/static/js/main.32ba4b6f.chunk.js", 5 | "main.js.map": "/static/js/main.32ba4b6f.chunk.js.map", 6 | "runtime-main.js": "/static/js/runtime-main.b0837650.js", 7 | "runtime-main.js.map": "/static/js/runtime-main.b0837650.js.map", 8 | "static/js/2.26396da2.chunk.js": "/static/js/2.26396da2.chunk.js", 9 | "static/js/2.26396da2.chunk.js.map": "/static/js/2.26396da2.chunk.js.map", 10 | "static/js/3.465f953a.chunk.js": "/static/js/3.465f953a.chunk.js", 11 | "static/js/3.465f953a.chunk.js.map": "/static/js/3.465f953a.chunk.js.map", 12 | "index.html": "/index.html", 13 | "static/css/main.667c8ed4.chunk.css.map": "/static/css/main.667c8ed4.chunk.css.map", 14 | "static/js/2.26396da2.chunk.js.LICENSE.txt": "/static/js/2.26396da2.chunk.js.LICENSE.txt", 15 | "static/media/Avocado.a47677c6.mp4": "/static/media/Avocado.a47677c6.mp4", 16 | "static/media/Capture.611de11d.png": "/static/media/Capture.611de11d.png", 17 | "static/media/carrot.6508ea02.png": "/static/media/carrot.6508ea02.png", 18 | "static/media/check-mark.1c103279.png": "/static/media/check-mark.1c103279.png", 19 | "static/media/date.fcfd3f00.png": "/static/media/date.fcfd3f00.png", 20 | "static/media/fast.f1644b7d.png": "/static/media/fast.f1644b7d.png", 21 | "static/media/footer.css": "/static/media/foodiesfeed.com_pizza-ready-for-baking.848a780e.jpg", 22 | "static/media/star.49259244.png": "/static/media/star.49259244.png" 23 | }, 24 | "entrypoints": [ 25 | "static/js/runtime-main.b0837650.js", 26 | "static/js/2.26396da2.chunk.js", 27 | "static/css/main.667c8ed4.chunk.css", 28 | "static/js/main.32ba4b6f.chunk.js" 29 | ] 30 | } -------------------------------------------------------------------------------- /public/build/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/public/build/favicon.ico -------------------------------------------------------------------------------- /public/build/index.html: -------------------------------------------------------------------------------- 1 | React App
-------------------------------------------------------------------------------- /public/build/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/public/build/logo192.png -------------------------------------------------------------------------------- /public/build/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goelabhishek694/Backend/c83bdf84d8829df26b4851aaf6e7fc8512282ba5/public/build/logo512.png -------------------------------------------------------------------------------- /public/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/build/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /public/build/static/css/main.667c8ed4.chunk.css: -------------------------------------------------------------------------------- 1 | body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#eef0ef;overflow-x:hidden}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.container-grey{width:100%;padding:120px 0}.container-grey,.form-container{display:flex;justify-content:center;align-items:center;background-color:#eef0ef}.form-container{width:650px;flex-direction:column;color:#6e6e6e;border-radius:10px;padding:50px 10px;box-shadow:0 10px 22px 10px rgb(27 38 49/10%)}.loginBox{height:80%;width:85%;padding-top:25px}.entryBox,.loginBox{display:flex;justify-content:center;align-items:center;flex-direction:column}.entryBox{height:75px;width:100%;margin-bottom:15px}.entryText{width:100%;font-size:17px}.entryBox .input{width:100%;height:65%;border:none;margin:0;background-color:#f8f8f8}.loginBtn{height:45px;width:30%;border-radius:2rem;margin-right:25px;background-color:#f7115f;border:3px solid #f7115f;color:#fff;font-size:15px;font-weight:600;margin-top:10px;cursor:pointer;transition:background-color .3s,-webkit-transform .3s;transition:transform .3s,background-color .3s;transition:transform .3s,background-color .3s,-webkit-transform .3s}.loginBtn:hover{-webkit-transform:scale(1.2);transform:scale(1.2)}.otherOption{height:40px;width:100%;display:flex;justify-content:flex-end;margin-top:25px}.otherbtns{font-size:17px;border:none;text-decoration:none;color:#6e6e6e;transition:.3s;margin-left:15px;cursor:pointer}.reviewImg{background-image:url(/static/media/foodiesfeed.com_pizza-ready-for-baking.848a780e.jpg);background-repeat:no-repeat;background-size:cover;background-attachment:fixed}.reviewCard{background:rgba(0,0,0,.699);padding:45px 0}.rDetail{width:100%}.rCard,.rDetail{display:flex;justify-content:space-evenly;align-items:center}.rCard{height:349px;width:23vw;margin:50px 0;padding:2rem 1.5rem;flex-direction:column;color:#6e6e6e;background-color:#eef0ef;border-radius:10px;box-shadow:0 10px 22px 10px rgb(27 38 49/10%);transition:.3s}.rCard:hover{-webkit-transform:scale(1.05);transform:scale(1.05)}.rimage{height:25%;width:20%;margin-bottom:0;justify-content:space-evenly}.rheader,.rimage{display:flex;align-items:center}.rheader{height:15%;width:100%;justify-content:center}.rh3{font-size:30px}.rsummary{height:45%;width:100%;display:flex;justify-content:center}.frate{height:6%;width:70%;display:flex;justify-content:space-evenly;align-items:center}.img{border-radius:50%}.para{font-size:17px}@media only screen and (max-width:850px){.rDetail{flex-direction:column}.rCard{width:314px;margin-bottom:30px}}.plansCard{margin:50px 0}.planDetails{width:100%;justify-content:space-evenly}.pCard,.planDetails{display:flex;align-items:center}.pCard{height:400px;width:280px;border-radius:10px;flex-direction:column;justify-content:center;color:#6e6e6e;transition:.3s;border:1px solid #6e6e6e;margin:55px 0}.pCard1{height:30%}.pCard1,.pCard2{width:90%;margin:0 10px;border-bottom:1px solid #6e6e6e}.pCard2{height:35%;padding:20px 0;display:flex;justify-content:space-evenly;align-items:center;flex-direction:column}.pCard .btn{position:relative;top:20px;margin:0}.btn a{text-decoration:none;color:#f0f8ff}.img{max-width:100%;max-height:100%}.ppoints{height:15%;width:100%;display:flex;align-items:center}.costpoint{height:24%}.costpoint,.point{width:100%;font-size:16px;margin:0 0 0 15px}.point{height:100%}.priceBox{height:70%;display:flex;justify-content:center}.price{height:100%;width:60%;font-size:46px;color:#f7115f}.duration,.price{display:flex;align-items:flex-end}.duration{height:90%;width:30%}@media only screen and (max-width:850px){.planDetails{flex-direction:column}.pCard{margin:25px}}.contactCard{height:120vh;width:100%;background-color:#212529;display:flex;align-items:center;flex-direction:column}.contactCard .h1Box{height:15%}.cDetail{height:80%;width:100%;justify-content:space-evenly}.cDetail,.videoBox{display:flex;align-items:center}.videoBox{height:70%;width:30%;justify-content:center}.video{max-width:100%;max-height:100%;width:auto;height:auto}.contactInfo{height:80%;width:35%;color:#6e6e6e}.entry{height:15%;width:100%;margin-bottom:3%}.entry-text{width:100%;font-size:110%;margin-bottom:5px}.contactCard input[type=text],input[type=email],input[type=password],select,textarea{height:65%;width:95%;border:none;outline:none;border-radius:3%;padding:5px;margin-bottom:10px;background-color:#f1eded}.textBox{height:30%}.textBox textarea{height:80%}input[type=checkbox]{margin-bottom:5%}.checkbox-conditions{font-size:14px;margin-left:5px}.sendBtn{height:10%;width:100%;margin-top:15px}.btn-full,.sendBtn{display:flex;justify-content:center;align-items:center}.btn-full{text-decoration:none;color:#f5f5f5;height:50px;width:35%;border-radius:2rem;background-color:#f7115f;transition:.3s}.btn-full:hover{-webkit-transform:scale(1.05);transform:scale(1.05)}@media only screen and (max-width:850px){.contactInfo{width:70%}.videoBox{display:none}}.bgImageCard{height:100vh;background-image:url(/static/media/foodiesfeed.com_pizza-ready-for-baking.848a780e.jpg);background-repeat:no-repeat;background-size:cover;background-attachment:fixed}.introCard{height:100vh;background-image:linear-gradient(rgba(0,0,0,.507),rgba(0,0,0,.849))}.iCard{height:270px;width:550px;position:relative;top:195px;left:200px;display:flex;flex-direction:column;justify-content:space-between}.headerBox{height:65%;width:100%}.header1,.header2{height:50%;width:100%}.header2,.hh1{display:flex;align-items:center}.hh1{height:100%;margin-top:0;margin-bottom:8px;justify-content:flex-start;color:#fff;font-weight:800}.animateh1,.hh1{font-size:55px;letter-spacing:2px}.animateh1{color:#f7115f;margin:0 0 8px 15px}.btnBox{height:25%;width:100%;display:flex;justify-content:flex-start;align-items:center}.btn{height:48px;width:130px;border-radius:2rem;margin-right:25px;border:3px solid #f7115f;font-size:15px;font-weight:600;transition:background-color .3s,-webkit-transform .3s;transition:transform .3s,background-color .3s;transition:transform .3s,background-color .3s,-webkit-transform .3s}.btn,.btn:hover{background-color:#f7115f;color:#fff}.btn:hover{-webkit-transform:scale(1.2);transform:scale(1.2)}.showMoreBtn{width:150px;background:transparent;color:#f7115f}.featureCard{width:100%;padding:30px 0}.stepsCard{width:100%;padding-bottom:55px}.h1Box{height:20%;align-items:center;flex-direction:column}.h1,.h1Box{width:100%;display:flex;justify-content:center}.h1{height:80%;align-items:flex-end;font-size:38px;color:#6e6e6e}.line{height:20%;width:370px;border-bottom:3px solid #ff104c}.fDetail{width:100%}.fCard,.fDetail{display:flex;justify-content:space-evenly;align-items:center}.fCard{height:65%;width:27%;margin:8rem 0;padding:3rem 1.5rem;flex-direction:column;color:#6e6e6e;background-color:#eef0ef;border-radius:10px;box-shadow:0 10px 22px 10px rgb(27 38 49/10%);transition:.3s}.fCard:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.fimage{height:25%;width:20%;margin-bottom:0;display:flex;justify-content:space-evenly;align-items:center}.fimg{max-height:100%;max-width:100%}.fheader{height:20%;width:100%;display:flex;justify-content:center;align-items:center}.fheader h3{font-size:18px;margin:15px 0}.fsummary{height:55%;width:100%}.fsummary,.para{display:flex;justify-content:center;align-items:center}.para{height:100%;font-size:95%;margin:0;color:#6e6e6e}.sbox1{height:550px;margin:50px 0}.sbox1,.sbox2{display:flex;justify-content:center}.sbox2{height:85%;width:45%;padding:45px 0;flex-direction:column;align-items:center}.stepsBox{height:25%;width:100%;margin-bottom:30px;justify-content:flex-start}.num,.stepsBox{display:flex;align-items:center}.num{height:60px;width:60px;border-radius:50%;justify-content:center;border:3px solid #f7115f;color:#f7115f;font-weight:400;font-size:30px}.steps{width:80%;height:100%;display:flex;justify-content:flex-start;align-items:flex-start;padding-left:20px}@media only screen and (max-width:850px){.h1Box{margin:25px 0}.h1{font-size:25px}.line{height:20%;width:200px}.fDetail{flex-direction:column}.fCard{height:55%;width:43%;padding:26px;margin:1rem 0}.sbox1{height:333px;width:31%;margin:0}.num{height:50px;width:50px}.iCard{height:270px;width:424px;left:90px}.hh1{font-size:50px}}*{margin:0;padding:0;box-sizing:border-box}.App{text-align:center}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion:no-preference){.App-logo{-webkit-animation:App-logo-spin 20s linear infinite;animation:App-logo-spin 20s linear infinite}}.App-header{background-color:#282c34;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin);color:#fff}.App-link{color:#61dafb}@-webkit-keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}nav{position:fixed;width:100%;transition:1s;z-index:2;background-color:rgba(26,25,25,.699)}.activeNavBar{background:rgba(0,0,0,.952);transition:1s}nav ul{list-style:none;overflow:hidden;color:#fff;padding:0;text-align:right;margin:0;background:transparent;transition:1s}nav.black ul{background:#000}nav ul li{display:inline-block;padding:20px 1.5rem}nav ul li:hover{background:rgba(0,0,0,.322);cursor:pointer}nav ul li a{text-decoration:none;color:#fff;font-size:20px}.footerImg{height:30vh;background-image:url(/static/media/foodiesfeed.com_pizza-ready-for-baking.848a780e.jpg);background-repeat:no-repeat;background-size:cover;background-attachment:fixed}footer{height:30vh;background-image:linear-gradient(rgba(0,0,0,.507),rgba(0,0,0,.849))}.footer-p{width:100%;display:flex;justify-content:center;align-items:center;color:#f5f5f5;margin-bottom:20px}.footer-parent{height:70%;display:flex}.footer-text{display:flex;width:70%;margin-top:50px;padding-right:6%}.icon-footer,.text-value a{font-size:1.5rem;color:#f3f2f2;text-decoration:none}li{list-style:none}.text-value{padding-right:6%}@media only screen and (max-width:850px){.text-value a{font-size:17px}}.allplansCard{padding-top:120px;justify-content:center;flex-direction:column;background-color:#eef0ef}.allplanDetails,.allplansCard{width:100%;display:flex;align-items:center}.allplanDetails{padding:55px 0;flex-wrap:wrap;justify-content:space-evenly}.apCard{height:400px;width:280px;border-radius:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#6e6e6e;transition:.3s;border:1px solid #6e6e6e}.apbtn{position:relative;top:15%}.planDetails .btn{text-decoration:none}.profileBox{height:100vh;width:100%;padding-top:30px;display:flex;justify-content:center;align-items:center;flex-direction:column;background-color:#eef0ef}.profileDetails{height:80%;width:40%}.profileImg{height:50%;width:100%;display:flex;justify-content:center;margin-top:10px;align-items:center}.profileImg img{max-height:100%;max-width:100%;border-radius:50%}.inputBox{height:10%;justify-content:center}.inputBox,.userDetail{width:100%;display:flex;align-items:center}.userDetail{height:40%;flex-direction:column}.profdetail{height:20%;width:70%;color:#302f2f;font-size:1.2rem;display:flex;align-items:center;justify-content:space-evenly}.profdetail h3{margin:0 10px 0 0}.profdetail h3,.profdetail p{height:100%;display:flex;justify-content:center;align-items:center}.profdetail p{margin:0}.profdetail button{height:80%;width:10%}.pDetailBox{padding:105px 0;margin:0 60px;background-color:#eef0ef}.planDetailBox{height:550px;padding:30px 20px;flex-direction:column}.planDetail,.planDetailBox{display:flex;align-items:center;justify-content:center}.planDetail{width:50%;padding:10px;margin-top:10px;box-shadow:0 10px 22px 10px rgb(27 38 49/10%);border-radius:10px}.entryText{padding:0 10px}.entryBox .input{height:35px;margin-top:10px;padding:0 10px}.entryBox .input,.reviewBox{display:flex;align-items:center}.reviewBox{flex-direction:column;justify-content:center}.reviewEnrty{height:85px;width:100%;display:flex;justify-content:center;align-items:center;margin-top:30px}.reviewEnrty input{height:55%;width:35%;margin-right:20px;border:none;padding:5px}.reviewEnrty select{width:25%;margin-right:20px;display:flex;align-items:center}.reviewsCard{width:50%;border-radius:10px;margin-bottom:30px;box-shadow:0 10px 22px 10px rgb(27 38 49/10%)}.pdreviews{height:100px;display:flex;justify-content:center;align-items:center;overflow:auto;padding:10px 20px}.pdrdetail{width:100%}.pdrdetail h3{color:#3d3c3c}.pdrdetail .input{color:#5c5b5b;height:30px;border:none;width:100%}.rcBtn{display:flex;justify-content:center;align-items:center;margin:15px 0;padding-bottom:5px}.rcBtn button{height:30px;width:100px}.rate{width:100%;height:46px;padding:0 10px}.rate:not(:checked)>label{float:right;overflow:hidden;white-space:nowrap;cursor:pointer;font-size:30px;color:#ccc}.rate:not(:checked)>label:before{content:"★"}.rate>input:checked~label{color:#ffc700}.rate:not(:checked)>label:hover,.rate:not(:checked)>label:hover~label{color:#deb217}.rate>input:checked+label:hover,.rate>input:checked+label:hover~label,.rate>input:checked~label:hover,.rate>input:checked~label:hover~label,.rate>label:hover~input:checked~label{color:#c59b08} 2 | /*# sourceMappingURL=main.667c8ed4.chunk.css.map */ -------------------------------------------------------------------------------- /public/build/static/css/main.667c8ed4.chunk.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack://src/index.css","webpack://src/Components/Styles/login.css","webpack://src/Components/Styles/review.css","webpack://src/Components/Styles/plan.css","webpack://src/Components/Styles/contact.css","webpack://src/Components/Styles/home.css","webpack://src/App.css","webpack://src/Components/Styles/nav.css","webpack://src/Components/Styles/footer.css","webpack://src/Components/Styles/allplans.css","webpack://src/Components/Styles/profile.css","webpack://src/Components/Styles/planDetail.css"],"names":[],"mappings":"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","file":"main.667c8ed4.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n background-color: #eef0ef;\n overflow-x: hidden;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n",".container-grey{\n width: 100%;\n padding: 120px 0;\n display: flex;\n justify-content:center;\n align-items: center;\n background-color: #eef0ef;\n}\n.form-container{\n width: 650px;\n display: flex;\n flex-direction: column;\n justify-content:center;\n align-items: center;\n color: #6e6e6e;\n background-color: #eef0ef;\n border-radius: 10px;\n padding: 50px 10px;\n box-shadow: 0 10px 22px 10px rgb(27 38 49 / 10%);\n}\n.loginBox{\n height: 80%;\n width: 85%;\n display: flex;\n justify-content:center;\n align-items: center;\n flex-direction: column;\n padding-top: 25px;\n\n}\n.entryBox{\n height: 75px;\n width: 100%;\n display: flex;\n justify-content:center;\n align-items: center;\n flex-direction: column;\n margin-bottom: 15px;\n}\n.entryText{\n width: 100%;\n font-size: 17px;\n}\n.entryBox .input{\n width: 100%;\n height: 65%;\n border: none;\n margin: 0;\n background-color: rgb(248, 248, 248);\n}\n.loginBtn{\n height: 45px;\n width: 30%;\n border-radius: 2rem;\n margin-right: 25px;\n background-color: #F7115F;\n border: 3px solid #F7115F;\n color: #ffffff;\n font-size: 15px;\n font-weight: 600;\n margin-top: 10px;\n cursor: pointer;\n transition: transform 0.3s, background-color 0.3s;\n}\n.loginBtn:hover{\n transform: scale(1.2);\n}\n.otherOption{\n height: 40px;\n width: 100%;\n display: flex;\n justify-content: flex-end;\n margin-top: 25px;\n}\n.otherbtns{\n font-size: 17px;\n border: none;\n text-decoration: none;\n color: #6e6e6e;\n transition: 0.3s;\n margin-left: 15px;\n cursor: pointer;\n}",".reviewImg{\n background-image: url('../Images/foodiesfeed.com_pizza-ready-for-baking.jpg');\n background-repeat: no-repeat;\n background-size: cover;\n background-attachment: fixed;\n}\n.reviewCard{\n background: rgba(0, 0, 0, 0.699);\n padding: 45px 0;\n}\n.rDetail{\n width: 100%;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n.rCard{\n height: 349px;\n width: 23vw;\n margin: 50px 0;\n padding: 2rem 1.5rem;\n /* margin-right: 1.5rem; */\n display: flex;\n flex-direction: column;\n justify-content: space-evenly;\n align-items: center;\n color: #6e6e6e;\n background-color: #eef0ef;\n border-radius: 10px;\n box-shadow: 0 10px 22px 10px rgb(27 38 49 / 10%);\n transition: 0.3s;\n}\n.rCard:hover{\n transform: scale(1.05);\n}\n.rimage{\n height: 25%;\n width: 20%;\n margin-bottom: 0;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n.rheader{\n height: 15%;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.rh3{\n font-size: 30px;\n}\n.rsummary{\n height: 45%;\n width: 100%;\n display: flex;\n justify-content: center;\n /* align-items: center; */\n}\n.frate{\n height: 6%;\n width: 70%;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n.img{\n max-height: 100%;\n max-width: 100%;\n border-radius: 50%;\n}\n.para{\n height: 100%;\n font-size: 17px;\n margin: 0;\n color: #6e6e6e;\n display: flex;\n justify-content: center;\n /* align-items: center; */\n}\n@media only screen and (max-width: 850px) {\n .rDetail{\n flex-direction: column;\n }\n .rCard{\n width: 314px;\n margin-bottom: 30px;\n }\n}",".plansCard{\n margin: 50px 0;\n}\n.planDetails{\n width: 100%;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n.pCard{\n height: 400px;\n width: 280px;\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n color: #6e6e6e;\n transition: 0.3s;\n border: 1px solid #6e6e6e;\n margin: 55px 0;\n}\n.pCard1{\n height: 30%;\n width: 90%;\n margin: 0 10px;\n /* background-color: hotpink; */\n border-bottom: 1px solid #6e6e6e;\n}\n.pCard2{\n height: 35%;\n width: 90%;\n margin: 0 10px;\n padding: 20px 0;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n flex-direction: column;\n border-bottom: 1px solid #6e6e6e;\n /* background-color: gray; */\n}\n.pCard .btn{\n position: relative;\n top: 20px;\n margin: 0;\n}\n.btn a{\n text-decoration: none;\n color: aliceblue;\n \n}\n.img{\n max-width: 100%;\n max-height: 100%;\n}\n.ppoints{\n height: 15%;\n width: 100%;\n display: flex;\n align-items: center;\n}\n.costpoint{\n height: 24%;\n width: 100%;\n margin: 0;\n font-size: 16px;\n margin-left: 15px;\n}\n.point{\n height: 100%;\n width: 100%;\n margin: 0;\n font-size: 16px;\n margin-left: 15px;\n}\n.priceBox{\n height: 70%;\n display: flex;\n justify-content: center;\n}\n.price{\n height: 100%;\n width: 60%;\n font-size: 46px;\n color:#F7115F;\n display: flex;\n align-items: flex-end;\n}\n.duration{\n height: 90%;\n width: 30%;\n display: flex;\n align-items: flex-end;\n}\n\n@media only screen and (max-width: 850px) {\n .planDetails{\n flex-direction: column;\n }\n .pCard{\n margin: 25px;\n }\n \n}",".contactCard{\n height: 120vh;\n width: 100%;\n background-color: #212529;\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n.contactCard .h1Box{\n height: 15%;\n}\n.cDetail{\n height: 80%;\n width: 100%;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n.videoBox{\n height: 70%;\n width: 30%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.video{\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n}\n.contactInfo{\n height: 80%;\n width: 35%; \n color: #6e6e6e;\n}\n.entry{\n height: 15%;\n width: 100%;\n margin-bottom:3%;\n}\n.entry-text {\n width: 100%;\n font-size: 110%;\n margin-bottom: 5px;\n}\n.contactCard input[type=\"text\"], input[type=\"email\"], input[type=\"password\"], select, textarea{\n height: 65%;\n width: 95%;\n border: none;\n outline: none;\n border-radius: 3%;\n padding: 5px;\n margin-bottom: 10px;\n background-color: rgb(241, 237, 237);\n}\n.textBox{\n height: 30%;\n}\n.textBox textarea{\n height: 80%;\n}\ninput[type=\"checkbox\"] {\n margin-bottom: 5%;\n /* height: 100%; */\n}\n.checkbox-conditions{\n font-size: 14px;\n margin-left: 5px;\n}\n.sendBtn{\n height: 10%;\n width: 100%;\n margin-top: 15px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.btn-full{\n text-decoration: none;\n color: whitesmoke;\n height: 50px;\n width: 35%;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 2rem;\n background-color: #F7115F;\n transition: 0.3s;\n}\n.btn-full:hover{\n transform: scale(1.05);\n}\n@media only screen and (max-width: 850px) {\n .contactInfo{\n width: 70%;\n }\n .videoBox{\n display: none;\n }\n}",".bgImageCard {\n height: 100vh;\n background-image: url('../Images/foodiesfeed.com_pizza-ready-for-baking.jpg');\n background-repeat: no-repeat;\n background-size: cover;\n background-attachment: fixed;\n}\n\n.introCard {\n height: 100vh;\n background-image: linear-gradient(rgba(0, 0, 0, 0.507), rgba(0, 0, 0, 0.849))\n}\n\n.iCard {\n height: 270px;\n width: 550px;\n position: relative;\n top: 195px;\n left: 200px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n /* background-color: aqua; */\n}\n\n.headerBox {\n height: 65%;\n width: 100%;\n}\n\n.header1 {\n height: 50%;\n width: 100%;\n}\n\n.header2 {\n height: 50%;\n width: 100%;\n display: flex;\n /* justify-content: center; */\n align-items: center;\n}\n\n.hh1 {\n height: 100%;\n margin-top: 0;\n margin-bottom: 8px;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n color: rgb(255, 255, 255);\n font-size: 55px;\n letter-spacing: 2px;\n font-weight: 800;\n}\n\n.animateh1 {\n margin: 0;\n margin-left: 15px;\n color: #F7115F;\n font-size: 55px;\n letter-spacing: 2px;\n margin-top: 0;\n margin-bottom: 8px;\n /* font-weight: 800; */\n}\n\n.btnBox {\n height: 25%;\n width: 100%;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n /* background-color: rgb(165, 165, 52); */\n}\n\n.btn {\n height: 48px;\n width: 130px;\n border-radius: 2rem;\n margin-right: 25px;\n background-color: #F7115F;\n border: 3px solid #F7115F;\n color: #ffffff;\n font-size: 15px;\n font-weight: 600;\n transition: transform 0.3s, background-color 0.3s;\n}\n\n.btn:hover {\n transform: scale(1.2);\n background-color: #F7115F;\n color: #ffffff;\n}\n\n.showMoreBtn {\n width: 150px;\n background: transparent;\n color: #F7115F;\n}\n\n.featureCard {\n width: 100%;\n padding: 30px 0;\n}\n\n.stepsCard {\n /* height: 90vh; */\n width: 100%;\n padding-bottom: 55px;\n}\n\n.h1Box {\n width: 100%;\n height: 20%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n\n.h1 {\n height: 80%;\n width: 100%;\n display: flex;\n align-items: flex-end;\n justify-content: center;\n font-size: 38px;\n color: #6e6e6e;\n /* background-color: aquamarine; */\n}\n\n.line {\n height: 20%;\n width: 370px;\n border-bottom: 3px solid rgb(255, 16, 76);\n}\n\n.fDetail {\n width: 100%;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n\n.fCard {\n height: 65%;\n width: 27%;\n margin: 8rem 0;\n padding: 3rem 1.5rem;\n /* margin-right: 1.5rem; */\n display: flex;\n flex-direction: column;\n justify-content: space-evenly;\n align-items: center;\n color: #6e6e6e;\n background-color: #eef0ef;\n border-radius: 10px;\n box-shadow: 0 10px 22px 10px rgb(27 38 49 / 10%);\n transition: 0.3s;\n}\n\n.fCard:hover {\n transform: scale(1.1);\n}\n\n.fimage {\n height: 25%;\n width: 20%;\n /* margin: 20px; */\n margin-bottom: 0;\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n\n.fimg {\n max-height: 100%;\n max-width: 100%;\n}\n\n.fheader {\n height: 20%;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.fheader h3 {\n font-size: 18px;\n margin: 15px 0;\n}\n\n.fsummary {\n height: 55%;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n /* margin: 20px; */\n /* margin-top: 0; */\n /* background-color: rgb(86, 84, 199); */\n}\n\n.para {\n height: 100%;\n font-size: 95%;\n margin: 0;\n color: #6e6e6e;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.sbox1 {\n height: 550px;\n margin: 50px 0;\n display: flex;\n justify-content: center;\n}\n\n.sbox2 {\n height: 85%;\n width: 45%;\n padding: 45px 0;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.stepsBox {\n height: 25%;\n width: 100%;\n margin-bottom: 30px;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n /* background-color: aqua; */\n}\n\n.num {\n height: 60px;\n width: 60px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 3px solid #F7115F;\n color: #F7115F;\n font-weight: 400;\n font-size: 30px;\n}\n\n.steps {\n width: 80%;\n height: 100%;\n display: flex;\n justify-content: flex-start;\n align-items: flex-start;\n padding-left: 20px;\n}\n\n/* http://192.168.29.98:3000 */\n\n@media only screen and (max-width: 850px) {\n .h1Box {\n margin: 25px 0;\n }\n .h1 {\n font-size: 25px;\n }\n .line {\n height: 20%;\n width: 200px;\n }\n .fDetail {\n flex-direction: column;\n }\n .fCard {\n height: 55%;\n width: 43%;\n padding: 26px;\n margin: 1rem 0;\n }\n .sbox1 {\n height: 333px;\n width: 31%;\n margin: 0;\n }\n .num {\n height: 50px;\n width: 50px;\n }\n .iCard{\n height: 270px;\n width: 424px;\n left: 90px;\n }\n .hh1{\n font-size: 50px;\n }\n}","* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\n.App {\n text-align: center;\n}\n\n.App-logo {\n height: 40vmin;\n pointer-events: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .App-logo {\n animation: App-logo-spin infinite 20s linear;\n }\n}\n\n.App-header {\n background-color: #282c34;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: calc(10px + 2vmin);\n color: white;\n}\n\n.App-link {\n color: #61dafb;\n}\n\n@keyframes App-logo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}","nav {\n position: fixed;\n width: 100%;\n transition: 1s;\n z-index: 2;\n background-color: rgba(26, 25, 25, 0.699)\n}\n\n.activeNavBar {\n background: rgba(0, 0, 0, 0.952);\n transition: 1s;\n}\n\nnav ul {\n list-style: none;\n overflow: hidden;\n color: #fff;\n padding: 0;\n text-align: right;\n margin: 0;\n background: rgba(0, 0, 0, 0);\n transition: 1s;\n}\n\nnav.black ul {\n background: #000;\n}\n\nnav ul li {\n display: inline-block;\n padding: 20px 1.5rem;\n}\n\nnav ul li:hover {\n background: rgba(0, 0, 0, 0.322);\n cursor: pointer;\n}\n\nnav ul li a {\n text-decoration: none;\n color: #fff;\n font-size: 20px;\n}\n\n",".footerImg{\n height: 30vh;\n background-image: url('../Images/foodiesfeed.com_pizza-ready-for-baking.jpg');\n background-repeat: no-repeat;\n background-size: cover;\n background-attachment: fixed;\n}\nfooter{\n height: 30vh;\n background-image: linear-gradient(rgba(0, 0, 0, 0.507), rgba(0, 0, 0, 0.849))\n}\n.footer-p{\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n color: whitesmoke;\n margin-bottom: 20px;\n}\n.footer-parent{\n height: 70%;\n display: flex;\n}\n.footer-text {\n display: flex;\n width: 70%;\n margin-top: 50px;\n padding-right: 6%;\n}\n.text-value a, .icon-footer {\n font-size: 1.5rem;\n color: rgb(243, 242, 242);\n text-decoration: none;\n}\nli {\n list-style: none;\n}\n.text-value {\n padding-right: 6%;\n}\n@media only screen and (max-width: 850px) {\n .text-value a{\n font-size: 17px;\n }\n}",".allplansCard {\n /* height: 100vh; */\n width: 100%;\n padding-top: 120px;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n background-color: #eef0ef;\n}\n\n.allplanDetails {\n width: 100%;\n padding: 55px 0;\n display: flex;\n flex-wrap: wrap;\n justify-content: space-evenly;\n align-items: center;\n}\n\n.apCard {\n height: 400px;\n width: 280px;\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n color: #6e6e6e;\n transition: 0.3s;\n border: 1px solid #6e6e6e;\n}\n.apbtn{\n position: relative;\n top: 15%;\n}\n.planDetails .btn {\n text-decoration: none;\n}",".profileBox{\n height: 100vh;\n width: 100%;\n padding-top: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n background-color: #eef0ef;\n}\n.profileDetails{\n height: 80%;\n width: 40%;\n}\n.profileImg{\n height: 50%;\n width: 100%;\n display: flex;\n justify-content: center;\n margin-top: 10px;\n align-items: center;\n}\n.profileImg img{\n max-height: 100%;\n max-width: 100%;\n border-radius: 50%;\n}\n.inputBox{\n height: 10%;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.userDetail{\n height: 40%;\n width: 100%;\n display: flex;\n flex-direction: column;\n /* justify-content: center; */\n align-items: center;\n}\n.profdetail{\n height: 20%;\n width: 70%;\n color: #302f2f;\n font-size: 1.2rem;\n display: flex;\n align-items: center;\n justify-content: space-evenly;\n /* background-color: rosybrown; */\n}\n.profdetail h3{\n height: 100%;\n margin: 0;\n margin-right: 10px;\n display: flex;\n justify-content: center;\n align-items: center;\n /* background-color: red; */\n}\n.profdetail p{\n height: 100%;\n margin: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n /* background-color: antiquewhite; */\n}\n.profdetail button{\n height: 80%;\n width: 10%;\n\n}",".pDetailBox{\n padding: 105px 0;\n margin: 0 60px;\n background-color: #eef0ef;\n}\n.planDetailBox{\n height: 550px;\n padding: 30px 20px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center ;\n}\n.planDetail{\n width: 50%;\n padding: 10px;\n /* border:1px solid; */\n margin-top: 10px;\n box-shadow: 0 10px 22px 10px rgb(27 38 49 / 10%);\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 10px;\n}\n.entryText{\n padding: 0 10px;\n}\n.entryBox .input{\n height: 35px;\n margin-top: 10px;\n padding: 0 10px;\n display: flex;\n align-items: center;\n}\n\n.reviewBox{\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center ;\n}\n.reviewEnrty{\n height: 85px;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-top: 30px;\n\n}\n.reviewEnrty input{\n height: 55%;\n width: 35%;\n margin-right: 20px;\n border: none;\n padding: 5px;\n}\n\n.reviewEnrty select{\n width: 25%;\n margin-right: 20px;\n display: flex;\n /* justify-content: center; */\n align-items: center;\n}\n.reviewsCard{\n width: 50%;\n border-radius: 10px;\n margin-bottom: 30px;\n box-shadow: 0 10px 22px 10px rgb(27 38 49 / 10%);\n}\n.pdreviews{\n height: 100px;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: auto;\n padding: 10px 20px;\n}\n.pdrdetail{\n width: 100%;\n}\n.pdrdetail h3{\n color: #3d3c3c;\n \n}\n.pdrdetail .input{\n color: #5c5b5b;\n height: 30px;\n border: none;\n width: 100%;\n}\n.rcBtn{\n display: flex;\n justify-content: center;\n align-items: center;\n margin: 15px 0;\n padding-bottom: 5px;\n}\n.rcBtn button{\n height: 30px;\n width: 100px;\n}\n.rate {\n width: 100%;\n height: 46px;\n padding: 0 10px;\n}\n.rate:not(:checked) > label {\n float:right;\n overflow:hidden;\n white-space:nowrap;\n cursor:pointer;\n font-size:30px;\n color:#ccc;\n}\n.rate:not(:checked) > label:before {\n content: '★';\n}\n.rate > input:checked ~ label {\n color: #ffc700; \n}\n.rate:not(:checked) > label:hover,\n.rate:not(:checked) > label:hover ~ label {\n color: #deb217; \n}\n.rate > input:checked + label:hover,\n.rate > input:checked + label:hover ~ label,\n.rate > input:checked ~ label:hover,\n.rate > input:checked ~ label:hover ~ label,\n.rate > label:hover ~ input:checked ~ label {\n color: #c59b08;\n}\n\n"]} -------------------------------------------------------------------------------- /public/build/static/js/2.26396da2.chunk.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /* 2 | object-assign 3 | (c) Sindre Sorhus 4 | @license MIT 5 | */ 6 | 7 | /** @license React v0.20.2 8 | * scheduler.production.min.js 9 | * 10 | * Copyright (c) Facebook, Inc. and its affiliates. 11 | * 12 | * This source code is licensed under the MIT license found in the 13 | * LICENSE file in the root directory of this source tree. 14 | */ 15 | 16 | /** @license React v16.13.1 17 | * react-is.production.min.js 18 | * 19 | * Copyright (c) Facebook, Inc. and its affiliates. 20 | * 21 | * This source code is licensed under the MIT license found in the 22 | * LICENSE file in the root directory of this source tree. 23 | */ 24 | 25 | /** @license React v17.0.2 26 | * react-dom.production.min.js 27 | * 28 | * Copyright (c) Facebook, Inc. and its affiliates. 29 | * 30 | * This source code is licensed under the MIT license found in the 31 | * LICENSE file in the root directory of this source tree. 32 | */ 33 | 34 | /** @license React v17.0.2 35 | * react-jsx-runtime.production.min.js 36 | * 37 | * Copyright (c) Facebook, Inc. and its affiliates. 38 | * 39 | * This source code is licensed under the MIT license found in the 40 | * LICENSE file in the root directory of this source tree. 41 | */ 42 | 43 | /** @license React v17.0.2 44 | * react.production.min.js 45 | * 46 | * Copyright (c) Facebook, Inc. and its affiliates. 47 | * 48 | * This source code is licensed under the MIT license found in the 49 | * LICENSE file in the root directory of this source tree. 50 | */ 51 | -------------------------------------------------------------------------------- /public/build/static/js/3.465f953a.chunk.js: -------------------------------------------------------------------------------- 1 | (this.webpackJsonpfoodapp=this.webpackJsonpfoodapp||[]).push([[3],{74:function(t,e,n){"use strict";n.r(e),n.d(e,"getCLS",(function(){return m})),n.d(e,"getFCP",(function(){return S})),n.d(e,"getFID",(function(){return F})),n.d(e,"getLCP",(function(){return k})),n.d(e,"getTTFB",(function(){return C}));var i,a,r,o,u=function(t,e){return{name:t,value:void 0===e?-1:e,delta:0,entries:[],id:"v1-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){if("first-input"===t&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(t){return t.getEntries().map(e)}));return n.observe({type:t,buffered:!0}),n}}catch(t){}},f=function(t,e){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(t(i),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},s=function(t){addEventListener("pageshow",(function(e){e.persisted&&t(e)}),!0)},p="function"==typeof WeakSet?new WeakSet:new Set,d=function(t,e,n){var i;return function(){e.value>=0&&(n||p.has(e)||"hidden"===document.visibilityState)&&(e.delta=e.value-(i||0),(e.delta||void 0===i)&&(i=e.value,t(e)))}},m=function(t,e){var n,i=u("CLS",0),a=function(t){t.hadRecentInput||(i.value+=t.value,i.entries.push(t),n())},r=c("layout-shift",a);r&&(n=d(t,i,e),f((function(){r.takeRecords().map(a),n()})),s((function(){i=u("CLS",0),n=d(t,i,e)})))},v=-1,l=function(){return"hidden"===document.visibilityState?0:1/0},h=function(){f((function(t){var e=t.timeStamp;v=e}),!0)},g=function(){return v<0&&(v=l(),h(),s((function(){setTimeout((function(){v=l(),h()}),0)}))),{get timeStamp(){return v}}},S=function(t,e){var n,i=g(),a=u("FCP"),r=function(t){"first-contentful-paint"===t.name&&(f&&f.disconnect(),t.startTime=0&&a1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,e){var n=function(){w(t,e),a()},i=function(){a()},a=function(){removeEventListener("pointerup",n,y),removeEventListener("pointercancel",i,y)};addEventListener("pointerup",n,y),addEventListener("pointercancel",i,y)}(e,t):w(e,t)}},b=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,T,y)}))},F=function(t,e){var n,r=g(),m=u("FID"),v=function(t){t.startTime=0&&(n||u.has(t)||\"hidden\"===document.visibilityState)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},s=function(e,t){var n,i=a(\"CLS\",0),u=function(e){e.hadRecentInput||(i.value+=e.value,i.entries.push(e),n())},s=r(\"layout-shift\",u);s&&(n=f(e,i,t),o((function(){s.takeRecords().map(u),n()})),c((function(){i=a(\"CLS\",0),n=f(e,i,t)})))},m=-1,p=function(){return\"hidden\"===document.visibilityState?0:1/0},v=function(){o((function(e){var t=e.timeStamp;m=t}),!0)},d=function(){return m<0&&(m=p(),v(),c((function(){setTimeout((function(){m=p(),v()}),0)}))),{get timeStamp(){return m}}},l=function(e,t){var n,i=d(),o=a(\"FCP\"),s=function(e){\"first-contentful-paint\"===e.name&&(p&&p.disconnect(),e.startTime=0&&t1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,t){var n=function(){y(e,t),a()},i=function(){a()},a=function(){removeEventListener(\"pointerup\",n,h),removeEventListener(\"pointercancel\",i,h)};addEventListener(\"pointerup\",n,h),addEventListener(\"pointercancel\",i,h)}(t,e):y(t,e)}},w=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(t){return e(t,E,h)}))},L=function(n,s){var m,p=d(),v=a(\"FID\"),l=function(e){e.startTime0?e.setAttribute("class","activeNavBar"):0===window.pageYOffset&&e.classList.remove("activeNavBar")}))}),[]),Object(m.jsx)("nav",{children:Object(m.jsx)("div",{className:"menu",children:Object(m.jsxs)("ul",{children:[Object(m.jsx)("li",{children:Object(m.jsx)(E.b,{to:"/",children:"Home"})}),Object(m.jsx)("li",{children:Object(m.jsx)(E.b,{to:"/allPlans",children:"Plans"})}),t?Object(m.jsxs)(m.Fragment,{children:[console.log(t),Object(m.jsx)("li",{children:Object(m.jsx)(E.b,{to:"/profilePage",children:null===t||void 0===t||null===(e=t.data)||void 0===e?void 0:e.name})}),Object(m.jsx)("li",{children:Object(m.jsx)(E.b,{to:"",onClick:c,children:"Logout"})})]}):Object(m.jsx)("li",{children:Object(m.jsx)(E.b,{to:"/login",children:"Login"})})]})})})};t(69);var A=function(){return Object(m.jsx)("div",{className:"footerImg",children:Object(m.jsxs)("footer",{children:[Object(m.jsxs)("div",{className:"footer-parent",children:[Object(m.jsxs)("ul",{className:"footer-text",children:[Object(m.jsx)("li",{className:"text-value",children:Object(m.jsx)(E.b,{to:"#",children:"About us"})}),Object(m.jsx)("li",{className:"text-value",children:Object(m.jsx)(E.b,{to:"#",children:"ios App"})}),Object(m.jsx)("li",{className:"text-value",children:Object(m.jsx)(E.b,{to:"#",children:"Android App"})})]}),Object(m.jsxs)("ul",{className:"social-link",children:[Object(m.jsx)("li",{children:Object(m.jsx)(E.b,{to:"https://www.facebook.com/foodyy.chaachaa"})}),Object(m.jsx)("li",{children:Object(m.jsx)(E.b,{to:"https://www.instagram.com/foddy_chaachaa"})}),Object(m.jsx)("li",{children:Object(m.jsx)(E.b,{to:"https://twitter.com/ChaaFoody"})}),Object(m.jsx)("li",{children:Object(m.jsx)(E.b,{to:"#"})})]})]}),Object(m.jsx)("p",{className:"footer-p",children:"Copyright \xa9 2019 EVERYONE. All rights reserved."})]})})};var I=function(){var e=Object(u.f)(),s=Object(a.useState)(""),t=Object(o.a)(s,2),c=t[0],n=t[1],r=Object(a.useState)(""),i=Object(o.a)(r,2),d=i[0],b=i[1],x=Object(a.useState)(!1),O=Object(o.a)(x,2),p=(O[0],O[1],Object(a.useContext)(h)),v=p.login,N=(p.user,function(){var s=Object(j.a)(l.a.mark((function s(){return l.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,v(d,c);case 3:e.push("/"),s.next=9;break;case 6:s.prev=6,s.t0=s.catch(0),console.log(s.t0);case 9:case"end":return s.stop()}}),s,null,[[0,6]])})));return function(){return s.apply(this,arguments)}}());return Object(m.jsx)("div",{className:"container-grey",children:Object(m.jsxs)("div",{className:"form-container",children:[Object(m.jsxs)("div",{className:"h1Box",children:[Object(m.jsx)("h1",{className:"h1",children:"LOGIN"}),Object(m.jsx)("div",{className:"line"})]}),Object(m.jsxs)("div",{className:"loginBox",children:[Object(m.jsxs)("div",{className:"entryBox",children:[Object(m.jsx)("div",{className:"entryText",children:"Email"}),Object(m.jsx)("input",{className:"email input",type:"email",name:"Email",placeholder:"Your Email",required:"",onChange:function(e){return b(e.target.value)}})]}),Object(m.jsxs)("div",{className:"entryBox",children:[Object(m.jsx)("div",{className:"entryText",children:"Password"}),Object(m.jsx)("input",{className:"password input",type:"password",name:"Password",placeholder:"**********",onChange:function(e){return n(e.target.value)}})]}),Object(m.jsx)("button",{className:"loginBtn form-button",type:"submit",onClick:N,children:"Login"}),Object(m.jsxs)("div",{className:"otherOption",children:[Object(m.jsx)("button",{className:" otherbtns form-button",type:"submit",children:Object(m.jsx)(E.b,{to:"/signup",className:"otherbtns",children:"Sign Up"})}),Object(m.jsx)("button",{className:" otherbtns form-button",type:"submit",children:Object(m.jsx)(E.b,{to:"/forgetPassword",className:"otherbtns",children:"Forget Password"})})]})]})]})})};var D=function(){var e=Object(u.f)(),s=Object(a.useState)(""),t=Object(o.a)(s,2),c=t[0],n=t[1],r=function(){var s=Object(j.a)(l.a.mark((function s(){var t;return l.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,b.a.post("/user/forgetpassword",{email:c});case 3:t=s.sent,e.push("/resetpassword"),console.log(t),s.next=11;break;case 8:s.prev=8,s.t0=s.catch(0),console.log(s.t0);case 11:case"end":return s.stop()}}),s,null,[[0,8]])})));return function(){return s.apply(this,arguments)}}();return Object(m.jsx)("div",{className:"container-grey",children:Object(m.jsxs)("div",{className:"form-container",children:[Object(m.jsxs)("div",{className:"h1Box",children:[Object(m.jsx)("h1",{className:"h1",children:"FORGET PASSWORD"}),Object(m.jsx)("div",{className:"line"})]}),Object(m.jsxs)("div",{className:"loginBox",children:[Object(m.jsxs)("div",{className:"entryBox",children:[Object(m.jsx)("div",{className:"entryText",children:"Email"}),Object(m.jsx)("input",{className:"email input",type:"email",name:"Email",placeholder:"Your Email",required:"",onChange:function(e){return n(e.target.value)}})]}),Object(m.jsx)("button",{className:"loginBtn form-button",type:"submit",onClick:r,children:"Send Email"})]})]})})};var R=function(){Object(u.f)();var e=Object(a.useState)(""),s=Object(o.a)(e,2),t=s[0],c=s[1],n=Object(a.useState)(""),r=Object(o.a)(n,2),i=r[0],d=r[1],h=function(){var e=Object(j.a)(l.a.mark((function e(){var s;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,b.a.post("/user/resetpassword/:token",{password:t,confirmPassword:i});case 3:s=e.sent,console.log(s),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();return Object(m.jsx)("div",{className:"container-grey",children:Object(m.jsxs)("div",{className:"form-container",children:[Object(m.jsxs)("div",{className:"h1Box",children:[Object(m.jsx)("h1",{className:"h1",children:"RESET PASSWORD"}),Object(m.jsx)("div",{className:"line"})]}),Object(m.jsxs)("div",{className:"loginBox",children:[Object(m.jsxs)("div",{className:"entryBox",children:[Object(m.jsx)("div",{className:"entryText",children:"Password"}),Object(m.jsx)("input",{className:"password input",type:"password",name:"Password",placeholder:"**********",onChange:function(e){return c(e.target.value)}})]}),Object(m.jsxs)("div",{className:"entryBox",children:[Object(m.jsx)("div",{className:"entryText",children:"Confirm Password"}),Object(m.jsx)("input",{className:"confirmPassword input",type:"password",name:"ConfirmPassword",placeholder:"**********",onChange:function(e){return d(e.target.value)}})]}),Object(m.jsx)("button",{className:"loginBtn form-button",type:"submit",onClick:h,children:"Reset Password"})]})]})})};t(70);var Y=function(){var e=Object(a.useState)([]),s=Object(o.a)(e,2),t=s[0],c=s[1];return Object(a.useEffect)(Object(j.a)(l.a.mark((function e(){var s;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,b.a.get("/plans/allPlans");case 3:s=e.sent,console.log(s.data),c(s.data.data),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])}))),[]),Object(m.jsxs)("div",{className:"allplansCard",children:[Object(m.jsxs)("div",{className:"h1Box",children:[Object(m.jsx)("h1",{className:"h1",children:"START EATING HEALTHY TODAY"}),Object(m.jsx)("div",{className:"line"})]}),Object(m.jsx)("div",{className:"allplanDetails",children:Object(m.jsx)("div",{className:"planDetails",children:t&&(null===t||void 0===t?void 0:t.map((function(e,s){return Object(m.jsxs)("div",{className:"apCard",children:[Object(m.jsx)("h3",{className:"h3",children:e.name}),Object(m.jsxs)("div",{className:"pCard1",children:[Object(m.jsxs)("div",{className:"priceBox",children:[Object(m.jsxs)("div",{className:"price",children:["Rs ",e.price]}),Object(m.jsx)("div",{className:"duration",children:"/month"})]}),Object(m.jsx)("p",{className:"point",children:"That\u2019s only 2\u20b9 per meal"})]}),Object(m.jsxs)("div",{className:"pCard2",children:[Object(m.jsxs)("div",{className:"ppoints",children:[Object(m.jsx)("img",{src:C,alt:"",className:"img"}),Object(m.jsxs)("p",{className:"point",children:[e.duration," meal every day"]})]}),Object(m.jsxs)("div",{className:"ppoints",children:[Object(m.jsx)("img",{src:C,alt:"",className:"img"}),Object(m.jsxs)("p",{className:"point",children:[e.discount," discount available."]})]}),Object(m.jsxs)("div",{className:"ppoints",children:[Object(m.jsx)("img",{src:C,alt:"",className:"img"}),Object(m.jsxs)("p",{className:"point",children:[e.ratingsAverage," rated meal."]})]})]}),Object(m.jsxs)("button",{className:"btn",children:[" ",Object(m.jsx)(E.b,{to:"/planDetail/".concat(e._id),children:"I'm Hungry"})]})]},s)})))})})]})};t(71);var L=function(){var e=Object(a.useState)(JSON.parse(localStorage.getItem("user")).data),s=Object(o.a)(e,2),t=s[0];s[1],Object(a.useEffect)(Object(j.a)(l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:w(t.name),i(t.password),N(t.email),x(t.password),console.log("abcd",t);case 5:case"end":return e.stop()}}),e)}))),[]);var c=Object(a.useState)(),n=Object(o.a)(c,2),r=n[0],i=n[1],d=Object(a.useState)(""),u=Object(o.a)(d,2),h=u[0],x=u[1],O=Object(a.useState)(""),p=Object(o.a)(O,2),v=p[0],N=p[1],f=Object(a.useState)(""),g=Object(o.a)(f,2),y=g[0],w=g[1],C=function(){var e=Object(j.a)(l.a.mark((function e(){var s;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,console.log(t._id),e.next=4,b.a.patch("/user/"+t._id,{email:v,name:y,password:r,confirmPassword:h,role:t.role,_id:t._id});case 4:s=e.sent,console.log(s.data.data),localStorage.setItem("user",JSON.stringify(s.data.data)),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();return console.log(t),Object(m.jsx)("div",{className:"container-grey",children:Object(m.jsxs)("div",{className:"form-container",children:[Object(m.jsxs)("div",{className:"h1Box",children:[Object(m.jsx)("h1",{className:"h1",children:"Profile"}),Object(m.jsx)("div",{className:"line"}),Object(m.jsx)("div",{className:"profileImage"})]}),Object(m.jsxs)("div",{className:"loginBox",children:[Object(m.jsx)("div",{className:"entryBox",children:Object(m.jsx)("input",{type:"file"})}),Object(m.jsxs)("div",{className:"entryBox",children:[Object(m.jsx)("div",{className:"entryText",children:"Email"}),Object(m.jsx)("input",{className:"email input",type:"email",value:v,onChange:function(e){return N(e.target.value)}})]}),Object(m.jsxs)("div",{className:"entryBox",children:[Object(m.jsx)("div",{className:"entryText",children:"Password"}),Object(m.jsx)("input",{className:"password input",type:"text",value:r,onChange:function(e){return i(e.target.value)}})]}),Object(m.jsxs)("div",{className:"entryBox",children:[Object(m.jsx)("div",{className:"entryText",children:"Confirm Password"}),Object(m.jsx)("input",{className:"password input",type:"text",value:h,onChange:function(e){return x(e.target.value)}})]}),Object(m.jsxs)("div",{className:"entryBox",children:[Object(m.jsx)("div",{className:"entryText",children:"Name"}),Object(m.jsx)("input",{className:"password input",type:"text",value:y,onChange:function(e){return w(e.target.value)}})]}),Object(m.jsx)("button",{className:"loginBtn form-button",type:"submit",onClick:C,children:"Update Profile"})]})]})})};t(72);var F=function(){var e=Object(a.useState)({}),s=Object(o.a)(e,2),t=s[0],c=s[1],n=Object(u.g)().id,r=Object(a.useState)(),i=Object(o.a)(r,2),d=i[0],h=i[1],O=Object(a.useState)(""),p=Object(o.a)(O,2),v=p[0],N=p[1],f=Object(a.useState)(),g=Object(o.a)(f,2),y=g[0],w=g[1],C=x().user;function S(e){return e.charAt(0).toUpperCase()+e.slice(1)}console.log(n),Object(a.useEffect)(Object(j.a)(l.a.mark((function e(){var s,t;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("inside useeffect"),e.next=3,b.a.get("/plans/plan/"+n);case 3:return s=e.sent,console.log(s,565785765),delete s.data.data._id,delete s.data.data.__v,c(s.data.data),e.next=10,b.a.get("/review/"+n);case 10:t=e.sent,console.log(t.data.data),h(t.data.data);case 13:case"end":return e.stop()}}),e)}))),[]),console.log(y);var B=function(){var e=Object(j.a)(l.a.mark((function e(){var s,t;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(123645),e.next=3,b.a.post("/review/crud/"+n,{review:v,rating:y,user:C.data._id,plan:n});case 3:return s=e.sent,console.log(s),e.next=7,b.a.get("/review/"+n);case 7:t=e.sent,h(t.data.data);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=Object(j.a)(l.a.mark((function e(s){var t,a;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,b.a.delete("/review/crud/"+n,{data:{id:s}});case 3:return t=e.sent,console.log(t.config.data),e.next=7,b.a.get("/review/"+n);case 7:a=e.sent,console.log(a),h(a.data.data),alert("review deleted"),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),alert(e.t0);case 16:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(s){return e.apply(this,arguments)}}();return Object(m.jsxs)("div",{className:"pDetailBox",children:[Object(m.jsxs)("div",{className:"h1Box",children:[Object(m.jsx)("h1",{className:"h1",children:"PLAN DETAILS"}),Object(m.jsx)("div",{className:"line"})]}),Object(m.jsx)("div",{className:"planDetailBox",children:Object(m.jsx)("div",{className:"planDetail",children:Object(m.jsx)("div",{className:"loginBox",children:Object.keys(t).map((function(e,s){return Object(m.jsxs)("div",{className:"entryBox",children:[Object(m.jsx)("div",{className:"entryText",children:S(e)}),Object(m.jsx)("div",{className:" input",children:S(t[e].toString())})]},s)}))})})}),Object(m.jsxs)("div",{className:"reviewBox",children:[Object(m.jsxs)("div",{className:"reviewEnrty",children:[Object(m.jsx)("input",{type:"text",value:v,onChange:function(e){return N(e.target.value)}}),Object(m.jsxs)("select",{name:"",id:"",className:"select",onChange:function(e){w(e.target.value)},children:[Object(m.jsx)("option",{value:"5",children:"5 Excellent"}),Object(m.jsx)("option",{value:"4",children:"4 Very Good"}),Object(m.jsx)("option",{value:"3",children:"3 Good"}),Object(m.jsx)("option",{value:"2",children:"2 Poor"}),Object(m.jsx)("option",{value:"1",children:"1 Very Poor"})]}),Object(m.jsx)("button",{className:"btn",onClick:B,children:"Submit"})]}),d&&(null===d||void 0===d?void 0:d.map((function(e,s){return Object(m.jsxs)("div",{className:"reviewsCard",children:[Object(m.jsxs)("div",{className:"pdreviews",children:[Object(m.jsxs)("div",{className:"pdrdetail",children:[Object(m.jsx)("h3",{children:e.user.name}),Object(m.jsxs)("div",{className:"input",children:[" ",e.review]})]}),Object(m.jsx)("div",{className:"rate",children:Object(m.jsx)("label",{htmlFor:"star5",title:"text",children:e.rating})})]}),Object(m.jsx)("div",{className:"rcBtn",children:Object(m.jsx)("button",{className:"showMoreBtn btn",onClick:function(){E(e._id)},children:"Delete"})})]},s)})))]})]})};var _=function(){return Object(m.jsx)(E.a,{children:Object(m.jsxs)(O,{children:[Object(m.jsx)(T,{}),Object(m.jsxs)(u.c,{children:[Object(m.jsx)(u.a,{path:"/signup",children:Object(m.jsx)(p,{})}),Object(m.jsx)(u.a,{path:"/login",children:Object(m.jsx)(I,{})}),Object(m.jsx)(u.a,{path:"/forgetPassword",children:Object(m.jsx)(D,{})}),Object(m.jsx)(u.a,{path:"/resetpassword",children:Object(m.jsx)(R,{})}),Object(m.jsx)(u.a,{path:"/allPlans",children:Object(m.jsx)(Y,{})}),Object(m.jsx)(u.a,{path:"/profilePage",children:Object(m.jsx)(L,{})}),Object(m.jsx)(u.a,{path:"/planDetail/:id",children:Object(m.jsx)(F,{})}),Object(m.jsx)(u.a,{path:"/",children:Object(m.jsx)(P,{})})]}),Object(m.jsx)(A,{})]})})},U=function(e){e&&e instanceof Function&&t.e(3).then(t.bind(null,74)).then((function(s){var t=s.getCLS,a=s.getFID,c=s.getFCP,n=s.getLCP,r=s.getTTFB;t(e),a(e),c(e),n(e),r(e)}))};r.a.render(Object(m.jsx)(_,{}),document.getElementById("root")),U()}},[[73,1,2]]]); 2 | //# sourceMappingURL=main.32ba4b6f.chunk.js.map -------------------------------------------------------------------------------- /public/build/static/js/runtime-main.b0837650.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=r[2],p=0,s=[];p'signup'/'forgetpassword' 6 | module.exports.sendMail = async function sendMail(str, data) { 7 | // create reusable transporter object using the default SMTP transport 8 | console.log("nodmailer called") 9 | let transporter = nodemailer.createTransport({ 10 | host: "smtp.gmail.com", 11 | port: 587, 12 | secure: false, // true for 465, false for other ports 13 | auth: { 14 | user: "goelabhishek694@gmail.com", // generated ethereal user 15 | pass: "dieebosgaupvfiyf" 16 | }, 17 | }); 18 | let eSubj, eHtml; 19 | if (str == "signup") { 20 | eSubj = `Thank You for signing ${data.name}`; 21 | eHtml = ` 22 |

Welcome to foodApp.com

23 | Hope you have a great experience 24 | Here are your details 25 | Name - ${data.name} 26 | Email - ${data.email} 27 | `; 28 | } else if (str == "forgetpassword") { 29 | eSubj = `Reset Password`; 30 | eHtml = ` 31 |

foodApp.com

32 | Here is your link to reset password : ${data.resetPasswordLink} 33 | `; 34 | } 35 | // send mail with defined transport object 36 | let info = await transporter.sendMail({ 37 | from: '"FoodApp 🥗" ', // sender address 38 | to: data.email, // list of receivers 39 | subject: eSubj, // Subject line 40 | // text: "Hello world?", // plain text body 41 | html: eHtml, // html body 42 | }); 43 | 44 | console.log("Message sent: %s", info.messageId); 45 | // Message sent: 46 | 47 | // Preview only available when sending through an Ethereal account 48 | }; 49 | 50 | // main().catch(console.error); 51 | --------------------------------------------------------------------------------