├── README.md ├── backend ├── .gitignore ├── index.js ├── package-lock.json └── package.json └── frontend ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── public └── index.html └── src ├── App.css ├── App.js ├── index.css ├── index.js ├── pages ├── Add.jsx ├── Books.jsx └── Update.jsx ├── reportWebVitals.js └── style.css /README.md: -------------------------------------------------------------------------------- 1 | 2 | # React CRUD App 3 | 4 | This is an React Node.js MySQL based web app with CRUD functionality. 5 | 6 | 7 | 8 | 9 | 10 | ## APK Downloading and Installation 11 | 12 | [Download MySQL community server](https://dev.mysql.com/downloads/mysql/) 13 | 14 | [Download MySQL Workbench](https://dev.mysql.com/downloads/workbench/) 15 | ## 🔗 Links 16 | [Get Started with My Medium Blog](https://medium.com/@vishnukvka/crud-app-using-react-and-mysql-ddf19f032b40) 17 | 18 | 19 | -------------------------------------------------------------------------------- /backend/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /backend/index.js: -------------------------------------------------------------------------------- 1 | import express from 'express' 2 | import mysql from 'mysql' 3 | import cors from 'cors' 4 | 5 | 6 | const app =express() 7 | 8 | const db=mysql.createConnection({ 9 | host:"localhost", 10 | user:"root", 11 | password:"root", 12 | database:"test" 13 | }) 14 | 15 | // to send from html body 16 | app.use(express.json()) 17 | app.use(cors()) 18 | 19 | app.get("/",(req,res)=>{ 20 | res.json("Hello World") 21 | }) 22 | 23 | app.get("/book",(req,res)=>{ 24 | const q="SELECT * FROM books" 25 | db.query(q,(err,data)=>{ 26 | if(err) return res.json(err) 27 | return res.json(data) 28 | }) 29 | }) 30 | 31 | app.post("/book",(req,res)=>{ 32 | const q ="INSERT INTO books (`title`,`desc`,`price`,`cover`) VALUES (?)"; 33 | // const values=["title from backend","desc from backend","cover pic from backend"]; 34 | const values=[ 35 | req.body.title, 36 | req.body.desc, 37 | req.body.price, 38 | req.body.cover 39 | ] 40 | db.query(q,[values],(err,data)=>{ 41 | if(err) return res.json(err) 42 | return res.json("Book has been added.") 43 | }) 44 | 45 | }) 46 | 47 | app.delete("/book/:id", (req,res)=>{ 48 | const bookId=req.params.id; 49 | const q="DELETE FROM books WHERE id=?" 50 | 51 | db.query(q,[bookId],(err,data)=>{ 52 | if(err) return res.json(err) 53 | return res.json("Book has been deleted.") 54 | }) 55 | }) 56 | 57 | app.put("/book/:id", (req,res)=>{ 58 | const bookId=req.params.id; 59 | const q="UPDATE books SET `title`=?,`desc`=?,`price`=?,`cover`=? WHERE id=?" 60 | const values=[ 61 | req.body.title, 62 | req.body.desc, 63 | req.body.price, 64 | req.body.cover 65 | ] 66 | db.query(q,[...values, bookId],(err,data)=>{ 67 | if(err) return res.json(err) 68 | return res.json("Book has been updated.") 69 | }) 70 | }) 71 | 72 | app.listen(8800,()=>{ 73 | console.log("Connect to backend.") 74 | }) -------------------------------------------------------------------------------- /backend/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backend", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "backend", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "cors": "^2.8.5", 13 | "express": "^4.18.2", 14 | "mysql": "^2.18.1", 15 | "mysql2": "^3.6.1", 16 | "nodemon": "^3.0.1" 17 | } 18 | }, 19 | "node_modules/abbrev": { 20 | "version": "1.1.1", 21 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", 22 | "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" 23 | }, 24 | "node_modules/accepts": { 25 | "version": "1.3.8", 26 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 27 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 28 | "dependencies": { 29 | "mime-types": "~2.1.34", 30 | "negotiator": "0.6.3" 31 | }, 32 | "engines": { 33 | "node": ">= 0.6" 34 | } 35 | }, 36 | "node_modules/anymatch": { 37 | "version": "3.1.3", 38 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 39 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 40 | "dependencies": { 41 | "normalize-path": "^3.0.0", 42 | "picomatch": "^2.0.4" 43 | }, 44 | "engines": { 45 | "node": ">= 8" 46 | } 47 | }, 48 | "node_modules/array-flatten": { 49 | "version": "1.1.1", 50 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 51 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" 52 | }, 53 | "node_modules/balanced-match": { 54 | "version": "1.0.2", 55 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 56 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" 57 | }, 58 | "node_modules/bignumber.js": { 59 | "version": "9.0.0", 60 | "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", 61 | "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", 62 | "engines": { 63 | "node": "*" 64 | } 65 | }, 66 | "node_modules/binary-extensions": { 67 | "version": "2.2.0", 68 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 69 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 70 | "engines": { 71 | "node": ">=8" 72 | } 73 | }, 74 | "node_modules/body-parser": { 75 | "version": "1.20.1", 76 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", 77 | "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", 78 | "dependencies": { 79 | "bytes": "3.1.2", 80 | "content-type": "~1.0.4", 81 | "debug": "2.6.9", 82 | "depd": "2.0.0", 83 | "destroy": "1.2.0", 84 | "http-errors": "2.0.0", 85 | "iconv-lite": "0.4.24", 86 | "on-finished": "2.4.1", 87 | "qs": "6.11.0", 88 | "raw-body": "2.5.1", 89 | "type-is": "~1.6.18", 90 | "unpipe": "1.0.0" 91 | }, 92 | "engines": { 93 | "node": ">= 0.8", 94 | "npm": "1.2.8000 || >= 1.4.16" 95 | } 96 | }, 97 | "node_modules/brace-expansion": { 98 | "version": "1.1.11", 99 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 100 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 101 | "dependencies": { 102 | "balanced-match": "^1.0.0", 103 | "concat-map": "0.0.1" 104 | } 105 | }, 106 | "node_modules/braces": { 107 | "version": "3.0.2", 108 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 109 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 110 | "dependencies": { 111 | "fill-range": "^7.0.1" 112 | }, 113 | "engines": { 114 | "node": ">=8" 115 | } 116 | }, 117 | "node_modules/bytes": { 118 | "version": "3.1.2", 119 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 120 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 121 | "engines": { 122 | "node": ">= 0.8" 123 | } 124 | }, 125 | "node_modules/call-bind": { 126 | "version": "1.0.2", 127 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", 128 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", 129 | "dependencies": { 130 | "function-bind": "^1.1.1", 131 | "get-intrinsic": "^1.0.2" 132 | }, 133 | "funding": { 134 | "url": "https://github.com/sponsors/ljharb" 135 | } 136 | }, 137 | "node_modules/chokidar": { 138 | "version": "3.5.3", 139 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 140 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 141 | "funding": [ 142 | { 143 | "type": "individual", 144 | "url": "https://paulmillr.com/funding/" 145 | } 146 | ], 147 | "dependencies": { 148 | "anymatch": "~3.1.2", 149 | "braces": "~3.0.2", 150 | "glob-parent": "~5.1.2", 151 | "is-binary-path": "~2.1.0", 152 | "is-glob": "~4.0.1", 153 | "normalize-path": "~3.0.0", 154 | "readdirp": "~3.6.0" 155 | }, 156 | "engines": { 157 | "node": ">= 8.10.0" 158 | }, 159 | "optionalDependencies": { 160 | "fsevents": "~2.3.2" 161 | } 162 | }, 163 | "node_modules/concat-map": { 164 | "version": "0.0.1", 165 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 166 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" 167 | }, 168 | "node_modules/content-disposition": { 169 | "version": "0.5.4", 170 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", 171 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 172 | "dependencies": { 173 | "safe-buffer": "5.2.1" 174 | }, 175 | "engines": { 176 | "node": ">= 0.6" 177 | } 178 | }, 179 | "node_modules/content-type": { 180 | "version": "1.0.5", 181 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", 182 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", 183 | "engines": { 184 | "node": ">= 0.6" 185 | } 186 | }, 187 | "node_modules/cookie": { 188 | "version": "0.5.0", 189 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", 190 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", 191 | "engines": { 192 | "node": ">= 0.6" 193 | } 194 | }, 195 | "node_modules/cookie-signature": { 196 | "version": "1.0.6", 197 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 198 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" 199 | }, 200 | "node_modules/core-util-is": { 201 | "version": "1.0.3", 202 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", 203 | "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" 204 | }, 205 | "node_modules/cors": { 206 | "version": "2.8.5", 207 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", 208 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", 209 | "dependencies": { 210 | "object-assign": "^4", 211 | "vary": "^1" 212 | }, 213 | "engines": { 214 | "node": ">= 0.10" 215 | } 216 | }, 217 | "node_modules/debug": { 218 | "version": "2.6.9", 219 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 220 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 221 | "dependencies": { 222 | "ms": "2.0.0" 223 | } 224 | }, 225 | "node_modules/denque": { 226 | "version": "2.1.0", 227 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", 228 | "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", 229 | "engines": { 230 | "node": ">=0.10" 231 | } 232 | }, 233 | "node_modules/depd": { 234 | "version": "2.0.0", 235 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 236 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 237 | "engines": { 238 | "node": ">= 0.8" 239 | } 240 | }, 241 | "node_modules/destroy": { 242 | "version": "1.2.0", 243 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 244 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", 245 | "engines": { 246 | "node": ">= 0.8", 247 | "npm": "1.2.8000 || >= 1.4.16" 248 | } 249 | }, 250 | "node_modules/ee-first": { 251 | "version": "1.1.1", 252 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 253 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" 254 | }, 255 | "node_modules/encodeurl": { 256 | "version": "1.0.2", 257 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 258 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", 259 | "engines": { 260 | "node": ">= 0.8" 261 | } 262 | }, 263 | "node_modules/escape-html": { 264 | "version": "1.0.3", 265 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 266 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" 267 | }, 268 | "node_modules/etag": { 269 | "version": "1.8.1", 270 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 271 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", 272 | "engines": { 273 | "node": ">= 0.6" 274 | } 275 | }, 276 | "node_modules/express": { 277 | "version": "4.18.2", 278 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", 279 | "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", 280 | "dependencies": { 281 | "accepts": "~1.3.8", 282 | "array-flatten": "1.1.1", 283 | "body-parser": "1.20.1", 284 | "content-disposition": "0.5.4", 285 | "content-type": "~1.0.4", 286 | "cookie": "0.5.0", 287 | "cookie-signature": "1.0.6", 288 | "debug": "2.6.9", 289 | "depd": "2.0.0", 290 | "encodeurl": "~1.0.2", 291 | "escape-html": "~1.0.3", 292 | "etag": "~1.8.1", 293 | "finalhandler": "1.2.0", 294 | "fresh": "0.5.2", 295 | "http-errors": "2.0.0", 296 | "merge-descriptors": "1.0.1", 297 | "methods": "~1.1.2", 298 | "on-finished": "2.4.1", 299 | "parseurl": "~1.3.3", 300 | "path-to-regexp": "0.1.7", 301 | "proxy-addr": "~2.0.7", 302 | "qs": "6.11.0", 303 | "range-parser": "~1.2.1", 304 | "safe-buffer": "5.2.1", 305 | "send": "0.18.0", 306 | "serve-static": "1.15.0", 307 | "setprototypeof": "1.2.0", 308 | "statuses": "2.0.1", 309 | "type-is": "~1.6.18", 310 | "utils-merge": "1.0.1", 311 | "vary": "~1.1.2" 312 | }, 313 | "engines": { 314 | "node": ">= 0.10.0" 315 | } 316 | }, 317 | "node_modules/fill-range": { 318 | "version": "7.0.1", 319 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 320 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 321 | "dependencies": { 322 | "to-regex-range": "^5.0.1" 323 | }, 324 | "engines": { 325 | "node": ">=8" 326 | } 327 | }, 328 | "node_modules/finalhandler": { 329 | "version": "1.2.0", 330 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", 331 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", 332 | "dependencies": { 333 | "debug": "2.6.9", 334 | "encodeurl": "~1.0.2", 335 | "escape-html": "~1.0.3", 336 | "on-finished": "2.4.1", 337 | "parseurl": "~1.3.3", 338 | "statuses": "2.0.1", 339 | "unpipe": "~1.0.0" 340 | }, 341 | "engines": { 342 | "node": ">= 0.8" 343 | } 344 | }, 345 | "node_modules/forwarded": { 346 | "version": "0.2.0", 347 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 348 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", 349 | "engines": { 350 | "node": ">= 0.6" 351 | } 352 | }, 353 | "node_modules/fresh": { 354 | "version": "0.5.2", 355 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 356 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", 357 | "engines": { 358 | "node": ">= 0.6" 359 | } 360 | }, 361 | "node_modules/fsevents": { 362 | "version": "2.3.3", 363 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", 364 | "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", 365 | "hasInstallScript": true, 366 | "optional": true, 367 | "os": [ 368 | "darwin" 369 | ], 370 | "engines": { 371 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 372 | } 373 | }, 374 | "node_modules/function-bind": { 375 | "version": "1.1.1", 376 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 377 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" 378 | }, 379 | "node_modules/generate-function": { 380 | "version": "2.3.1", 381 | "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", 382 | "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", 383 | "dependencies": { 384 | "is-property": "^1.0.2" 385 | } 386 | }, 387 | "node_modules/get-intrinsic": { 388 | "version": "1.2.1", 389 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", 390 | "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", 391 | "dependencies": { 392 | "function-bind": "^1.1.1", 393 | "has": "^1.0.3", 394 | "has-proto": "^1.0.1", 395 | "has-symbols": "^1.0.3" 396 | }, 397 | "funding": { 398 | "url": "https://github.com/sponsors/ljharb" 399 | } 400 | }, 401 | "node_modules/glob-parent": { 402 | "version": "5.1.2", 403 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 404 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 405 | "dependencies": { 406 | "is-glob": "^4.0.1" 407 | }, 408 | "engines": { 409 | "node": ">= 6" 410 | } 411 | }, 412 | "node_modules/has": { 413 | "version": "1.0.3", 414 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 415 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 416 | "dependencies": { 417 | "function-bind": "^1.1.1" 418 | }, 419 | "engines": { 420 | "node": ">= 0.4.0" 421 | } 422 | }, 423 | "node_modules/has-flag": { 424 | "version": "3.0.0", 425 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 426 | "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", 427 | "engines": { 428 | "node": ">=4" 429 | } 430 | }, 431 | "node_modules/has-proto": { 432 | "version": "1.0.1", 433 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", 434 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", 435 | "engines": { 436 | "node": ">= 0.4" 437 | }, 438 | "funding": { 439 | "url": "https://github.com/sponsors/ljharb" 440 | } 441 | }, 442 | "node_modules/has-symbols": { 443 | "version": "1.0.3", 444 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 445 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 446 | "engines": { 447 | "node": ">= 0.4" 448 | }, 449 | "funding": { 450 | "url": "https://github.com/sponsors/ljharb" 451 | } 452 | }, 453 | "node_modules/http-errors": { 454 | "version": "2.0.0", 455 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 456 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 457 | "dependencies": { 458 | "depd": "2.0.0", 459 | "inherits": "2.0.4", 460 | "setprototypeof": "1.2.0", 461 | "statuses": "2.0.1", 462 | "toidentifier": "1.0.1" 463 | }, 464 | "engines": { 465 | "node": ">= 0.8" 466 | } 467 | }, 468 | "node_modules/iconv-lite": { 469 | "version": "0.4.24", 470 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 471 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 472 | "dependencies": { 473 | "safer-buffer": ">= 2.1.2 < 3" 474 | }, 475 | "engines": { 476 | "node": ">=0.10.0" 477 | } 478 | }, 479 | "node_modules/ignore-by-default": { 480 | "version": "1.0.1", 481 | "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", 482 | "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==" 483 | }, 484 | "node_modules/inherits": { 485 | "version": "2.0.4", 486 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 487 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 488 | }, 489 | "node_modules/ipaddr.js": { 490 | "version": "1.9.1", 491 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 492 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 493 | "engines": { 494 | "node": ">= 0.10" 495 | } 496 | }, 497 | "node_modules/is-binary-path": { 498 | "version": "2.1.0", 499 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 500 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 501 | "dependencies": { 502 | "binary-extensions": "^2.0.0" 503 | }, 504 | "engines": { 505 | "node": ">=8" 506 | } 507 | }, 508 | "node_modules/is-extglob": { 509 | "version": "2.1.1", 510 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 511 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 512 | "engines": { 513 | "node": ">=0.10.0" 514 | } 515 | }, 516 | "node_modules/is-glob": { 517 | "version": "4.0.3", 518 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 519 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 520 | "dependencies": { 521 | "is-extglob": "^2.1.1" 522 | }, 523 | "engines": { 524 | "node": ">=0.10.0" 525 | } 526 | }, 527 | "node_modules/is-number": { 528 | "version": "7.0.0", 529 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 530 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 531 | "engines": { 532 | "node": ">=0.12.0" 533 | } 534 | }, 535 | "node_modules/is-property": { 536 | "version": "1.0.2", 537 | "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", 538 | "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" 539 | }, 540 | "node_modules/isarray": { 541 | "version": "1.0.0", 542 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 543 | "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" 544 | }, 545 | "node_modules/long": { 546 | "version": "5.2.3", 547 | "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", 548 | "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" 549 | }, 550 | "node_modules/lru-cache": { 551 | "version": "6.0.0", 552 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 553 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 554 | "dependencies": { 555 | "yallist": "^4.0.0" 556 | }, 557 | "engines": { 558 | "node": ">=10" 559 | } 560 | }, 561 | "node_modules/media-typer": { 562 | "version": "0.3.0", 563 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 564 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", 565 | "engines": { 566 | "node": ">= 0.6" 567 | } 568 | }, 569 | "node_modules/merge-descriptors": { 570 | "version": "1.0.1", 571 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 572 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" 573 | }, 574 | "node_modules/methods": { 575 | "version": "1.1.2", 576 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 577 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", 578 | "engines": { 579 | "node": ">= 0.6" 580 | } 581 | }, 582 | "node_modules/mime": { 583 | "version": "1.6.0", 584 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 585 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 586 | "bin": { 587 | "mime": "cli.js" 588 | }, 589 | "engines": { 590 | "node": ">=4" 591 | } 592 | }, 593 | "node_modules/mime-db": { 594 | "version": "1.52.0", 595 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 596 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 597 | "engines": { 598 | "node": ">= 0.6" 599 | } 600 | }, 601 | "node_modules/mime-types": { 602 | "version": "2.1.35", 603 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 604 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 605 | "dependencies": { 606 | "mime-db": "1.52.0" 607 | }, 608 | "engines": { 609 | "node": ">= 0.6" 610 | } 611 | }, 612 | "node_modules/minimatch": { 613 | "version": "3.1.2", 614 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 615 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 616 | "dependencies": { 617 | "brace-expansion": "^1.1.7" 618 | }, 619 | "engines": { 620 | "node": "*" 621 | } 622 | }, 623 | "node_modules/ms": { 624 | "version": "2.0.0", 625 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 626 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 627 | }, 628 | "node_modules/mysql": { 629 | "version": "2.18.1", 630 | "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", 631 | "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", 632 | "dependencies": { 633 | "bignumber.js": "9.0.0", 634 | "readable-stream": "2.3.7", 635 | "safe-buffer": "5.1.2", 636 | "sqlstring": "2.3.1" 637 | }, 638 | "engines": { 639 | "node": ">= 0.6" 640 | } 641 | }, 642 | "node_modules/mysql/node_modules/safe-buffer": { 643 | "version": "5.1.2", 644 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 645 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 646 | }, 647 | "node_modules/mysql2": { 648 | "version": "3.6.1", 649 | "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.6.1.tgz", 650 | "integrity": "sha512-O7FXjLtNkjcMBpLURwkXIhyVbX9i4lq4nNRCykPNOXfceq94kJ0miagmTEGCZieuO8JtwtXaZ41U6KT4eF9y3g==", 651 | "dependencies": { 652 | "denque": "^2.1.0", 653 | "generate-function": "^2.3.1", 654 | "iconv-lite": "^0.6.3", 655 | "long": "^5.2.1", 656 | "lru-cache": "^8.0.0", 657 | "named-placeholders": "^1.1.3", 658 | "seq-queue": "^0.0.5", 659 | "sqlstring": "^2.3.2" 660 | }, 661 | "engines": { 662 | "node": ">= 8.0" 663 | } 664 | }, 665 | "node_modules/mysql2/node_modules/iconv-lite": { 666 | "version": "0.6.3", 667 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", 668 | "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", 669 | "dependencies": { 670 | "safer-buffer": ">= 2.1.2 < 3.0.0" 671 | }, 672 | "engines": { 673 | "node": ">=0.10.0" 674 | } 675 | }, 676 | "node_modules/mysql2/node_modules/lru-cache": { 677 | "version": "8.0.5", 678 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", 679 | "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", 680 | "engines": { 681 | "node": ">=16.14" 682 | } 683 | }, 684 | "node_modules/mysql2/node_modules/sqlstring": { 685 | "version": "2.3.3", 686 | "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", 687 | "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", 688 | "engines": { 689 | "node": ">= 0.6" 690 | } 691 | }, 692 | "node_modules/named-placeholders": { 693 | "version": "1.1.3", 694 | "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", 695 | "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", 696 | "dependencies": { 697 | "lru-cache": "^7.14.1" 698 | }, 699 | "engines": { 700 | "node": ">=12.0.0" 701 | } 702 | }, 703 | "node_modules/named-placeholders/node_modules/lru-cache": { 704 | "version": "7.18.3", 705 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", 706 | "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", 707 | "engines": { 708 | "node": ">=12" 709 | } 710 | }, 711 | "node_modules/negotiator": { 712 | "version": "0.6.3", 713 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 714 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", 715 | "engines": { 716 | "node": ">= 0.6" 717 | } 718 | }, 719 | "node_modules/nodemon": { 720 | "version": "3.0.1", 721 | "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", 722 | "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", 723 | "dependencies": { 724 | "chokidar": "^3.5.2", 725 | "debug": "^3.2.7", 726 | "ignore-by-default": "^1.0.1", 727 | "minimatch": "^3.1.2", 728 | "pstree.remy": "^1.1.8", 729 | "semver": "^7.5.3", 730 | "simple-update-notifier": "^2.0.0", 731 | "supports-color": "^5.5.0", 732 | "touch": "^3.1.0", 733 | "undefsafe": "^2.0.5" 734 | }, 735 | "bin": { 736 | "nodemon": "bin/nodemon.js" 737 | }, 738 | "engines": { 739 | "node": ">=10" 740 | }, 741 | "funding": { 742 | "type": "opencollective", 743 | "url": "https://opencollective.com/nodemon" 744 | } 745 | }, 746 | "node_modules/nodemon/node_modules/debug": { 747 | "version": "3.2.7", 748 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", 749 | "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", 750 | "dependencies": { 751 | "ms": "^2.1.1" 752 | } 753 | }, 754 | "node_modules/nodemon/node_modules/ms": { 755 | "version": "2.1.3", 756 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 757 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 758 | }, 759 | "node_modules/nopt": { 760 | "version": "1.0.10", 761 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", 762 | "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", 763 | "dependencies": { 764 | "abbrev": "1" 765 | }, 766 | "bin": { 767 | "nopt": "bin/nopt.js" 768 | }, 769 | "engines": { 770 | "node": "*" 771 | } 772 | }, 773 | "node_modules/normalize-path": { 774 | "version": "3.0.0", 775 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 776 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 777 | "engines": { 778 | "node": ">=0.10.0" 779 | } 780 | }, 781 | "node_modules/object-assign": { 782 | "version": "4.1.1", 783 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 784 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", 785 | "engines": { 786 | "node": ">=0.10.0" 787 | } 788 | }, 789 | "node_modules/object-inspect": { 790 | "version": "1.12.3", 791 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", 792 | "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", 793 | "funding": { 794 | "url": "https://github.com/sponsors/ljharb" 795 | } 796 | }, 797 | "node_modules/on-finished": { 798 | "version": "2.4.1", 799 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 800 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 801 | "dependencies": { 802 | "ee-first": "1.1.1" 803 | }, 804 | "engines": { 805 | "node": ">= 0.8" 806 | } 807 | }, 808 | "node_modules/parseurl": { 809 | "version": "1.3.3", 810 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 811 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 812 | "engines": { 813 | "node": ">= 0.8" 814 | } 815 | }, 816 | "node_modules/path-to-regexp": { 817 | "version": "0.1.7", 818 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 819 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" 820 | }, 821 | "node_modules/picomatch": { 822 | "version": "2.3.1", 823 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 824 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 825 | "engines": { 826 | "node": ">=8.6" 827 | }, 828 | "funding": { 829 | "url": "https://github.com/sponsors/jonschlinkert" 830 | } 831 | }, 832 | "node_modules/process-nextick-args": { 833 | "version": "2.0.1", 834 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 835 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" 836 | }, 837 | "node_modules/proxy-addr": { 838 | "version": "2.0.7", 839 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 840 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 841 | "dependencies": { 842 | "forwarded": "0.2.0", 843 | "ipaddr.js": "1.9.1" 844 | }, 845 | "engines": { 846 | "node": ">= 0.10" 847 | } 848 | }, 849 | "node_modules/pstree.remy": { 850 | "version": "1.1.8", 851 | "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", 852 | "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" 853 | }, 854 | "node_modules/qs": { 855 | "version": "6.11.0", 856 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", 857 | "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", 858 | "dependencies": { 859 | "side-channel": "^1.0.4" 860 | }, 861 | "engines": { 862 | "node": ">=0.6" 863 | }, 864 | "funding": { 865 | "url": "https://github.com/sponsors/ljharb" 866 | } 867 | }, 868 | "node_modules/range-parser": { 869 | "version": "1.2.1", 870 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 871 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 872 | "engines": { 873 | "node": ">= 0.6" 874 | } 875 | }, 876 | "node_modules/raw-body": { 877 | "version": "2.5.1", 878 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", 879 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", 880 | "dependencies": { 881 | "bytes": "3.1.2", 882 | "http-errors": "2.0.0", 883 | "iconv-lite": "0.4.24", 884 | "unpipe": "1.0.0" 885 | }, 886 | "engines": { 887 | "node": ">= 0.8" 888 | } 889 | }, 890 | "node_modules/readable-stream": { 891 | "version": "2.3.7", 892 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", 893 | "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", 894 | "dependencies": { 895 | "core-util-is": "~1.0.0", 896 | "inherits": "~2.0.3", 897 | "isarray": "~1.0.0", 898 | "process-nextick-args": "~2.0.0", 899 | "safe-buffer": "~5.1.1", 900 | "string_decoder": "~1.1.1", 901 | "util-deprecate": "~1.0.1" 902 | } 903 | }, 904 | "node_modules/readable-stream/node_modules/safe-buffer": { 905 | "version": "5.1.2", 906 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 907 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 908 | }, 909 | "node_modules/readdirp": { 910 | "version": "3.6.0", 911 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 912 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 913 | "dependencies": { 914 | "picomatch": "^2.2.1" 915 | }, 916 | "engines": { 917 | "node": ">=8.10.0" 918 | } 919 | }, 920 | "node_modules/safe-buffer": { 921 | "version": "5.2.1", 922 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 923 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 924 | "funding": [ 925 | { 926 | "type": "github", 927 | "url": "https://github.com/sponsors/feross" 928 | }, 929 | { 930 | "type": "patreon", 931 | "url": "https://www.patreon.com/feross" 932 | }, 933 | { 934 | "type": "consulting", 935 | "url": "https://feross.org/support" 936 | } 937 | ] 938 | }, 939 | "node_modules/safer-buffer": { 940 | "version": "2.1.2", 941 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 942 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 943 | }, 944 | "node_modules/semver": { 945 | "version": "7.5.4", 946 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", 947 | "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", 948 | "dependencies": { 949 | "lru-cache": "^6.0.0" 950 | }, 951 | "bin": { 952 | "semver": "bin/semver.js" 953 | }, 954 | "engines": { 955 | "node": ">=10" 956 | } 957 | }, 958 | "node_modules/send": { 959 | "version": "0.18.0", 960 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", 961 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", 962 | "dependencies": { 963 | "debug": "2.6.9", 964 | "depd": "2.0.0", 965 | "destroy": "1.2.0", 966 | "encodeurl": "~1.0.2", 967 | "escape-html": "~1.0.3", 968 | "etag": "~1.8.1", 969 | "fresh": "0.5.2", 970 | "http-errors": "2.0.0", 971 | "mime": "1.6.0", 972 | "ms": "2.1.3", 973 | "on-finished": "2.4.1", 974 | "range-parser": "~1.2.1", 975 | "statuses": "2.0.1" 976 | }, 977 | "engines": { 978 | "node": ">= 0.8.0" 979 | } 980 | }, 981 | "node_modules/send/node_modules/ms": { 982 | "version": "2.1.3", 983 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 984 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 985 | }, 986 | "node_modules/seq-queue": { 987 | "version": "0.0.5", 988 | "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", 989 | "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" 990 | }, 991 | "node_modules/serve-static": { 992 | "version": "1.15.0", 993 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", 994 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", 995 | "dependencies": { 996 | "encodeurl": "~1.0.2", 997 | "escape-html": "~1.0.3", 998 | "parseurl": "~1.3.3", 999 | "send": "0.18.0" 1000 | }, 1001 | "engines": { 1002 | "node": ">= 0.8.0" 1003 | } 1004 | }, 1005 | "node_modules/setprototypeof": { 1006 | "version": "1.2.0", 1007 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 1008 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" 1009 | }, 1010 | "node_modules/side-channel": { 1011 | "version": "1.0.4", 1012 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 1013 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 1014 | "dependencies": { 1015 | "call-bind": "^1.0.0", 1016 | "get-intrinsic": "^1.0.2", 1017 | "object-inspect": "^1.9.0" 1018 | }, 1019 | "funding": { 1020 | "url": "https://github.com/sponsors/ljharb" 1021 | } 1022 | }, 1023 | "node_modules/simple-update-notifier": { 1024 | "version": "2.0.0", 1025 | "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", 1026 | "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", 1027 | "dependencies": { 1028 | "semver": "^7.5.3" 1029 | }, 1030 | "engines": { 1031 | "node": ">=10" 1032 | } 1033 | }, 1034 | "node_modules/sqlstring": { 1035 | "version": "2.3.1", 1036 | "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", 1037 | "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==", 1038 | "engines": { 1039 | "node": ">= 0.6" 1040 | } 1041 | }, 1042 | "node_modules/statuses": { 1043 | "version": "2.0.1", 1044 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 1045 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", 1046 | "engines": { 1047 | "node": ">= 0.8" 1048 | } 1049 | }, 1050 | "node_modules/string_decoder": { 1051 | "version": "1.1.1", 1052 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 1053 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 1054 | "dependencies": { 1055 | "safe-buffer": "~5.1.0" 1056 | } 1057 | }, 1058 | "node_modules/string_decoder/node_modules/safe-buffer": { 1059 | "version": "5.1.2", 1060 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1061 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 1062 | }, 1063 | "node_modules/supports-color": { 1064 | "version": "5.5.0", 1065 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1066 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1067 | "dependencies": { 1068 | "has-flag": "^3.0.0" 1069 | }, 1070 | "engines": { 1071 | "node": ">=4" 1072 | } 1073 | }, 1074 | "node_modules/to-regex-range": { 1075 | "version": "5.0.1", 1076 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1077 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1078 | "dependencies": { 1079 | "is-number": "^7.0.0" 1080 | }, 1081 | "engines": { 1082 | "node": ">=8.0" 1083 | } 1084 | }, 1085 | "node_modules/toidentifier": { 1086 | "version": "1.0.1", 1087 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 1088 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", 1089 | "engines": { 1090 | "node": ">=0.6" 1091 | } 1092 | }, 1093 | "node_modules/touch": { 1094 | "version": "3.1.0", 1095 | "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", 1096 | "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", 1097 | "dependencies": { 1098 | "nopt": "~1.0.10" 1099 | }, 1100 | "bin": { 1101 | "nodetouch": "bin/nodetouch.js" 1102 | } 1103 | }, 1104 | "node_modules/type-is": { 1105 | "version": "1.6.18", 1106 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 1107 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1108 | "dependencies": { 1109 | "media-typer": "0.3.0", 1110 | "mime-types": "~2.1.24" 1111 | }, 1112 | "engines": { 1113 | "node": ">= 0.6" 1114 | } 1115 | }, 1116 | "node_modules/undefsafe": { 1117 | "version": "2.0.5", 1118 | "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", 1119 | "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" 1120 | }, 1121 | "node_modules/unpipe": { 1122 | "version": "1.0.0", 1123 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1124 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", 1125 | "engines": { 1126 | "node": ">= 0.8" 1127 | } 1128 | }, 1129 | "node_modules/util-deprecate": { 1130 | "version": "1.0.2", 1131 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1132 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" 1133 | }, 1134 | "node_modules/utils-merge": { 1135 | "version": "1.0.1", 1136 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1137 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", 1138 | "engines": { 1139 | "node": ">= 0.4.0" 1140 | } 1141 | }, 1142 | "node_modules/vary": { 1143 | "version": "1.1.2", 1144 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1145 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", 1146 | "engines": { 1147 | "node": ">= 0.8" 1148 | } 1149 | }, 1150 | "node_modules/yallist": { 1151 | "version": "4.0.0", 1152 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 1153 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" 1154 | } 1155 | } 1156 | } 1157 | -------------------------------------------------------------------------------- /backend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backend", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "type": "module", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1", 9 | "start": "nodemon index.js" 10 | }, 11 | "keywords": [], 12 | "author": "", 13 | "license": "ISC", 14 | "dependencies": { 15 | "cors": "^2.8.5", 16 | "express": "^4.18.2", 17 | "mysql": "^2.18.1", 18 | "mysql2": "^3.6.1", 19 | "nodemon": "^3.0.1" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /frontend/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.17.0", 7 | "@testing-library/react": "^13.4.0", 8 | "@testing-library/user-event": "^13.5.0", 9 | "axios": "^1.5.0", 10 | "react": "^18.2.0", 11 | "react-dom": "^18.2.0", 12 | "react-router-dom": "^6.16.0", 13 | "react-scripts": "5.0.1", 14 | "web-vitals": "^2.1.4" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test", 20 | "eject": "react-scripts eject" 21 | }, 22 | "eslintConfig": { 23 | "extends": [ 24 | "react-app", 25 | "react-app/jest" 26 | ] 27 | }, 28 | "browserslist": { 29 | "production": [ 30 | ">0.2%", 31 | "not dead", 32 | "not op_mini all" 33 | ], 34 | "development": [ 35 | "last 1 chrome version", 36 | "last 1 firefox version", 37 | "last 1 safari version" 38 | ] 39 | }, 40 | "devDependencies": { 41 | "@babel/plugin-proposal-private-property-in-object": "^7.21.11" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /frontend/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /frontend/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /frontend/src/App.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | import { 4 | BrowserRouter, 5 | Routes, 6 | Route 7 | } from "react-router-dom"; 8 | 9 | 10 | 11 | import Books from "./pages/Books"; 12 | import Add from "./pages/Add"; 13 | import Update from "./pages/Update"; 14 | import "./style.css" 15 | 16 | function App() { 17 | return ( 18 |
19 | 20 | 21 | }/> 22 | }/> 23 | }/> 24 | 25 | 26 |
27 | ); 28 | } 29 | 30 | export default App; 31 | -------------------------------------------------------------------------------- /frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import App from './App'; 4 | import reportWebVitals from './reportWebVitals'; 5 | 6 | const root = ReactDOM.createRoot(document.getElementById('root')); 7 | root.render( 8 | 9 | 10 | 11 | ); 12 | 13 | // If you want to start measuring performance in your app, pass a function 14 | // to log results (for example: reportWebVitals(console.log)) 15 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 16 | reportWebVitals(); 17 | -------------------------------------------------------------------------------- /frontend/src/pages/Add.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react' 2 | import axios from 'axios'; 3 | import {useNavigate} from "react-router-dom" 4 | 5 | const Add=()=> { 6 | const [book,setBook]=useState({ 7 | title:"", 8 | desc:"", 9 | price:null, 10 | cover:"", 11 | }); 12 | 13 | const navigate=useNavigate() 14 | 15 | const handleChange=(e)=>{ 16 | setBook((prev)=>({ ...prev, [e.target.name]:e.target.value})); 17 | }; 18 | console.log(book) 19 | 20 | const handleClick =async e=>{ 21 | e.preventDefault() 22 | try{ 23 | await axios.post("http://localhost:8800/book",book) 24 | navigate("/") 25 | }catch(err){ 26 | console.log(err) 27 | } 28 | } 29 | return ( 30 |
31 | 37 | 43 | 49 | 55 | 56 | 57 |
58 | ) 59 | } 60 | 61 | export default Add -------------------------------------------------------------------------------- /frontend/src/pages/Books.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import {useEffect, useState} from 'react' 3 | import axios from 'axios' 4 | import { Link } from "react-router-dom"; 5 | 6 | const Books=()=> { 7 | const [books, setBooks]= useState([]); 8 | 9 | useEffect(()=>{ 10 | const fetchAllBooks= async ()=>{ 11 | try{ 12 | const res=await axios.get("http://localhost:8800/book"); 13 | // console.log(res) 14 | setBooks(res.data); 15 | }catch(err){ 16 | console.log(err); 17 | } 18 | } 19 | fetchAllBooks() 20 | },[]); 21 | 22 | const handleDelete= async (id)=>{ 23 | try{ 24 | await axios.delete("http://localhost:8800/book/"+id); 25 | window.location.reload() 26 | }catch(err){ 27 | console.log(err); 28 | } 29 | } 30 | 31 | return ( 32 |
33 |

My Books

34 |
35 | {books.map(book=>( 36 |
37 | {book.cover && } 38 |

{book.title}

39 |

{book.desc}

40 | {book.price} 41 | 42 | 43 |
44 | ))} 45 | 46 | 51 |
52 | 53 |
54 | ); 55 | } 56 | 57 | export default Books -------------------------------------------------------------------------------- /frontend/src/pages/Update.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react' 2 | import axios from 'axios'; 3 | import {useLocation, useNavigate} from "react-router-dom" 4 | 5 | const Update=()=> { 6 | const [book,setBook]=useState({ 7 | title:"", 8 | desc:"", 9 | price:null, 10 | cover:"", 11 | }); 12 | 13 | const navigate=useNavigate() 14 | const location=useLocation() 15 | 16 | const bookId = location.pathname.split("/")[2] 17 | 18 | const handleChange=(e)=>{ 19 | setBook((prev)=>({ ...prev, [e.target.name]:e.target.value})); 20 | }; 21 | console.log(book) 22 | 23 | const handleClick =async e=>{ 24 | e.preventDefault() 25 | try{ 26 | await axios.put("http://localhost:8800/book/"+bookId,book) 27 | navigate("/") 28 | }catch(err){ 29 | console.log(err) 30 | } 31 | } 32 | return ( 33 |
34 |

Update the Book

35 | 41 | 47 | 53 | 59 | 60 | 61 |
62 | ) 63 | } 64 | 65 | export default Update -------------------------------------------------------------------------------- /frontend/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /frontend/src/style.css: -------------------------------------------------------------------------------- 1 | .App{ 2 | height: 100vh; 3 | padding: 0px 100px; 4 | display: flex; 5 | align-items: center; 6 | justify-content: center; 7 | text-align: center; 8 | } 9 | 10 | .books{ 11 | display: flex; 12 | gap: 10px; 13 | } 14 | 15 | .book{ 16 | flex: 1; 17 | display: flex; 18 | flex-direction: column; 19 | gap: 10px; 20 | align-items: center; 21 | } 22 | 23 | img{ 24 | width:200px; 25 | height: 300px; 26 | object-fit: cover; 27 | background-color: aquamarine; 28 | } 29 | 30 | .update{ 31 | border: none; 32 | padding: 3px 6px; 33 | background-color: white; 34 | cursor: pointer; 35 | border: 1px solid rgb(204,204,243); 36 | color: rgb(139, 139,234); 37 | } 38 | 39 | .delete{ 40 | border: none; 41 | padding: 3px 6px; 42 | background-color: white; 43 | cursor: pointer; 44 | border: 1px solid rgb(245,191,191); 45 | color: rgb(242, 100,100); 46 | } 47 | 48 | .form{ 49 | display: flex; 50 | flex-direction: column; 51 | gap:20px 52 | } 53 | 54 | input{ 55 | width:250px; 56 | padding: 10px; 57 | border: 1px solid gray; 58 | } 59 | 60 | .formButton{ 61 | border: none; 62 | padding: 10px; 63 | background-color: lightcoral; 64 | color: white; 65 | font-weight: bold; 66 | cursor: pointer; 67 | } 68 | --------------------------------------------------------------------------------