- Timestamp:
- 09/08/22 12:38:24 (2 years ago)
- Branches:
- master
- Children:
- ee05663
- Parents:
- 717ceae
- Location:
- backend
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
backend/models/userModel.js
r717ceae r16237c4 4 4 { 5 5 name: { type: String, required: true }, 6 contact: { type: String, required: true }, 6 7 email: { type: String, required: true, unique: true }, 7 8 password: { type: String, required: true }, -
backend/package-lock.json
r717ceae r16237c4 13 13 "dotenv": "^16.0.1", 14 14 "express": "^4.18.1", 15 "express-async-handler": "^1.2.0", 16 "jsonwebtoken": "^8.5.1", 15 17 "mongoose": "^6.5.3" 16 18 }, … … 192 194 } 193 195 }, 196 "node_modules/buffer-equal-constant-time": { 197 "version": "1.0.1", 198 "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", 199 "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" 200 }, 194 201 "node_modules/bytes": { 195 202 "version": "3.1.2", … … 316 323 "engines": { 317 324 "node": ">=12" 325 } 326 }, 327 "node_modules/ecdsa-sig-formatter": { 328 "version": "1.0.11", 329 "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", 330 "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", 331 "dependencies": { 332 "safe-buffer": "^5.0.1" 318 333 } 319 334 }, … … 385 400 } 386 401 }, 402 "node_modules/express-async-handler": { 403 "version": "1.2.0", 404 "resolved": "https://registry.npmjs.org/express-async-handler/-/express-async-handler-1.2.0.tgz", 405 "integrity": "sha512-rCSVtPXRmQSW8rmik/AIb2P0op6l7r1fMW538yyvTMltCO4xQEWMmobfrIxN2V1/mVrgxB8Az3reYF6yUZw37w==" 406 }, 387 407 "node_modules/fill-range": { 388 408 "version": "7.0.1", … … 616 636 } 617 637 }, 638 "node_modules/jsonwebtoken": { 639 "version": "8.5.1", 640 "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", 641 "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", 642 "dependencies": { 643 "jws": "^3.2.2", 644 "lodash.includes": "^4.3.0", 645 "lodash.isboolean": "^3.0.3", 646 "lodash.isinteger": "^4.0.4", 647 "lodash.isnumber": "^3.0.3", 648 "lodash.isplainobject": "^4.0.6", 649 "lodash.isstring": "^4.0.1", 650 "lodash.once": "^4.0.0", 651 "ms": "^2.1.1", 652 "semver": "^5.6.0" 653 }, 654 "engines": { 655 "node": ">=4", 656 "npm": ">=1.4.28" 657 } 658 }, 659 "node_modules/jsonwebtoken/node_modules/ms": { 660 "version": "2.1.3", 661 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 662 "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 663 }, 664 "node_modules/jwa": { 665 "version": "1.4.1", 666 "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", 667 "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", 668 "dependencies": { 669 "buffer-equal-constant-time": "1.0.1", 670 "ecdsa-sig-formatter": "1.0.11", 671 "safe-buffer": "^5.0.1" 672 } 673 }, 674 "node_modules/jws": { 675 "version": "3.2.2", 676 "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", 677 "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", 678 "dependencies": { 679 "jwa": "^1.4.1", 680 "safe-buffer": "^5.0.1" 681 } 682 }, 618 683 "node_modules/kareem": { 619 684 "version": "2.4.1", 620 685 "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.4.1.tgz", 621 686 "integrity": "sha512-aJ9opVoXroQUPfovYP5kaj2lM7Jn02Gw13bL0lg9v0V7SaUc0qavPs0Eue7d2DcC3NjqI6QAUElXNsuZSeM+EA==" 687 }, 688 "node_modules/lodash.includes": { 689 "version": "4.3.0", 690 "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", 691 "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" 692 }, 693 "node_modules/lodash.isboolean": { 694 "version": "3.0.3", 695 "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", 696 "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" 697 }, 698 "node_modules/lodash.isinteger": { 699 "version": "4.0.4", 700 "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", 701 "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" 702 }, 703 "node_modules/lodash.isnumber": { 704 "version": "3.0.3", 705 "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", 706 "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" 707 }, 708 "node_modules/lodash.isplainobject": { 709 "version": "4.0.6", 710 "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", 711 "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" 712 }, 713 "node_modules/lodash.isstring": { 714 "version": "4.0.1", 715 "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", 716 "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" 717 }, 718 "node_modules/lodash.once": { 719 "version": "4.1.1", 720 "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", 721 "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" 622 722 }, 623 723 "node_modules/media-typer": { … … 1021 1121 "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 1022 1122 "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 1023 "dev": true,1024 1123 "bin": { 1025 1124 "semver": "bin/semver" … … 1396 1495 } 1397 1496 }, 1497 "buffer-equal-constant-time": { 1498 "version": "1.0.1", 1499 "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", 1500 "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" 1501 }, 1398 1502 "bytes": { 1399 1503 "version": "3.1.2", … … 1482 1586 "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz", 1483 1587 "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==" 1588 }, 1589 "ecdsa-sig-formatter": { 1590 "version": "1.0.11", 1591 "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", 1592 "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", 1593 "requires": { 1594 "safe-buffer": "^5.0.1" 1595 } 1484 1596 }, 1485 1597 "ee-first": { … … 1541 1653 } 1542 1654 }, 1655 "express-async-handler": { 1656 "version": "1.2.0", 1657 "resolved": "https://registry.npmjs.org/express-async-handler/-/express-async-handler-1.2.0.tgz", 1658 "integrity": "sha512-rCSVtPXRmQSW8rmik/AIb2P0op6l7r1fMW538yyvTMltCO4xQEWMmobfrIxN2V1/mVrgxB8Az3reYF6yUZw37w==" 1659 }, 1543 1660 "fill-range": { 1544 1661 "version": "7.0.1", … … 1700 1817 "dev": true 1701 1818 }, 1819 "jsonwebtoken": { 1820 "version": "8.5.1", 1821 "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", 1822 "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", 1823 "requires": { 1824 "jws": "^3.2.2", 1825 "lodash.includes": "^4.3.0", 1826 "lodash.isboolean": "^3.0.3", 1827 "lodash.isinteger": "^4.0.4", 1828 "lodash.isnumber": "^3.0.3", 1829 "lodash.isplainobject": "^4.0.6", 1830 "lodash.isstring": "^4.0.1", 1831 "lodash.once": "^4.0.0", 1832 "ms": "^2.1.1", 1833 "semver": "^5.6.0" 1834 }, 1835 "dependencies": { 1836 "ms": { 1837 "version": "2.1.3", 1838 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1839 "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 1840 } 1841 } 1842 }, 1843 "jwa": { 1844 "version": "1.4.1", 1845 "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", 1846 "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", 1847 "requires": { 1848 "buffer-equal-constant-time": "1.0.1", 1849 "ecdsa-sig-formatter": "1.0.11", 1850 "safe-buffer": "^5.0.1" 1851 } 1852 }, 1853 "jws": { 1854 "version": "3.2.2", 1855 "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", 1856 "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", 1857 "requires": { 1858 "jwa": "^1.4.1", 1859 "safe-buffer": "^5.0.1" 1860 } 1861 }, 1702 1862 "kareem": { 1703 1863 "version": "2.4.1", 1704 1864 "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.4.1.tgz", 1705 1865 "integrity": "sha512-aJ9opVoXroQUPfovYP5kaj2lM7Jn02Gw13bL0lg9v0V7SaUc0qavPs0Eue7d2DcC3NjqI6QAUElXNsuZSeM+EA==" 1866 }, 1867 "lodash.includes": { 1868 "version": "4.3.0", 1869 "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", 1870 "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" 1871 }, 1872 "lodash.isboolean": { 1873 "version": "3.0.3", 1874 "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", 1875 "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" 1876 }, 1877 "lodash.isinteger": { 1878 "version": "4.0.4", 1879 "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", 1880 "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" 1881 }, 1882 "lodash.isnumber": { 1883 "version": "3.0.3", 1884 "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", 1885 "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" 1886 }, 1887 "lodash.isplainobject": { 1888 "version": "4.0.6", 1889 "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", 1890 "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" 1891 }, 1892 "lodash.isstring": { 1893 "version": "4.0.1", 1894 "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", 1895 "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" 1896 }, 1897 "lodash.once": { 1898 "version": "4.1.1", 1899 "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", 1900 "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" 1706 1901 }, 1707 1902 "media-typer": { … … 1987 2182 "version": "5.7.1", 1988 2183 "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 1989 "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 1990 "dev": true 2184 "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" 1991 2185 }, 1992 2186 "send": { -
backend/package.json
r717ceae r16237c4 15 15 "dotenv": "^16.0.1", 16 16 "express": "^4.18.1", 17 "express-async-handler": "^1.2.0", 18 "jsonwebtoken": "^8.5.1", 17 19 "mongoose": "^6.5.3" 18 20 }, -
backend/server.js
r717ceae r16237c4 5 5 import seedRouter from "./routes/seedRoutes.js"; 6 6 import productRouter from "./routes/productRoutes.js"; 7 import userRouter from "./routes/userRoutes.js"; 8 import orderRouter from "./routes/orderRoutes.js"; 7 9 8 10 dotenv.config(); … … 18 20 19 21 const app = express(); 22 23 app.use(express.json()); 24 app.use(express.urlencoded({ extended: true })); 25 20 26 app.use("/api/seed", seedRouter); 21 27 app.use("/api/products", productRouter); 28 app.use("/api/users", userRouter); 29 app.use("/api/orders", orderRouter); 30 31 app.use((err, req, res, next) => { 32 res.status(500).send({ message: err.message }); 33 }); 22 34 23 35 const port = process.env.PORT || 5000;
Note:
See TracChangeset
for help on using the changeset viewer.