├── .gitignore ├── LICENSE ├── README.md ├── assets ├── css │ └── style.css └── js │ └── index.js ├── package-lock.json ├── package.json ├── server.js ├── server ├── controller │ └── controller.js ├── database │ └── connection.js ├── model │ └── model.js ├── routes │ └── router.js └── services │ └── render.js └── views ├── add_user.ejs ├── include ├── _footer.ejs ├── _form.ejs ├── _header.ejs └── _show.ejs ├── index.ejs └── update_user.ejs /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | config.env -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CRUD_Application_Node 2 | In this project, we are going to create node CRUD application with express and mongodb. 3 | 4 | #### To Run this project Clone it and install modules using 5 | ``` 6 | npm install 7 | ``` 8 | 9 | Then Create config.env file and create PORT and MONGO_URI Variable and specify Value. 10 | That's it. You are ready to go. To execute this project just type 11 | ``` 12 | npm start 13 | ``` 14 | 15 | Enjoy...! 16 | -------------------------------------------------------------------------------- /assets/css/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Barlow&family=PT+Sans&display=swap'); 2 | 3 | :root{ 4 | --dark: #2b2d42; 5 | --light: #adb5bd; 6 | --border: #dee2e6; 7 | --border-btn: #edf2f4; 8 | } 9 | 10 | * { 11 | padding: 0; 12 | margin: 0; 13 | box-sizing: border-box; 14 | } 15 | 16 | a { 17 | text-decoration: none; 18 | font-family: 'PT Sans', sans-serif; 19 | } 20 | 21 | .container{ 22 | max-width: 1024px; 23 | margin: auto; 24 | } 25 | 26 | .nav-brand{ 27 | font-size: 1.5em; 28 | font-weight: bold; 29 | } 30 | 31 | .d-flex{ 32 | display: flex; 33 | flex-wrap: wrap; 34 | } 35 | 36 | .justify-between{ 37 | justify-content: space-between; 38 | } 39 | 40 | .text-center{ 41 | text-align: center; 42 | } 43 | 44 | .border-shadow{ 45 | border: 1px solid var(--border-btn); 46 | box-shadow: 1px 3px 10px #e9ecef; 47 | } 48 | 49 | .text-dark{ 50 | color: var(--dark); 51 | } 52 | 53 | .inline{ 54 | display: inline-block; 55 | } 56 | 57 | .text-light{ 58 | color: var(--light); 59 | } 60 | 61 | .text-gradient{ 62 | background: linear-gradient(to right, #8e2de2, #4a00e0); 63 | -webkit-background-clip: text; 64 | background-clip: text; 65 | -webkit-text-fill-color: transparent; 66 | } 67 | 68 | #header nav{ 69 | background-color: #06d6a0; 70 | padding: 1em 0; 71 | width: 100%; 72 | } 73 | 74 | #site-main{ 75 | margin-top: 6em; 76 | font-family: 'Barlow', sans-serif; 77 | } 78 | 79 | #site-main .container .box-nav > a{ 80 | font-size: 1em; 81 | padding: .5em 1em; 82 | } 83 | 84 | #site-main .container form{ 85 | margin: 2em 0; 86 | } 87 | 88 | table{ 89 | border-spacing: 0px; 90 | width: 100%; 91 | } 92 | 93 | .table td, .table th{ 94 | padding: .75em; 95 | vertical-align: top; 96 | text-align: center; 97 | border-top: 1px solid var(--border); 98 | } 99 | 100 | .table td > a.btn{ 101 | padding: .3em 1em; 102 | font-size: 1.1em; 103 | margin: 0 .2em; 104 | } 105 | 106 | .table tr:hover{ 107 | background-color:#06d6a0 ; 108 | } 109 | 110 | .table tr:hover td > a{ 111 | box-shadow: none; 112 | } 113 | 114 | .table .thead-dark th{ 115 | color: #fff; 116 | background-color: var(--dark) ; 117 | border-color: #32383e; 118 | } 119 | 120 | @media only screen and (max-width: 1024px){ 121 | table, thead, tbody, th, td, tr{ 122 | display: block; 123 | } 124 | 125 | thead tr{ 126 | position: absolute; 127 | top: -9999px; 128 | left: -9999px; 129 | } 130 | 131 | tr { border: 1px solid var(--border);} 132 | 133 | td{ 134 | border: none; 135 | position: relative; 136 | } 137 | 138 | } 139 | 140 | /* add user & update user template */ 141 | .form-title{ 142 | margin-top: 2em; 143 | } 144 | 145 | .form-title > h2{ 146 | padding: .5em 0; 147 | } 148 | 149 | .new_user{ 150 | max-width: 786px; 151 | margin: auto; 152 | } 153 | 154 | #update_user .form-group, 155 | #add_user .form-group{ 156 | margin: .4em 0; 157 | } 158 | 159 | #update_user .form-group input[type="text"], 160 | #add_user .form-group input[type="text"]{ 161 | width: 100%; 162 | padding: .6em 1em; 163 | margin: .5em 0; 164 | border: 1px solid var(--border); 165 | font-family: 'Barlow', sans-serif; 166 | font-size: 1em; 167 | border-radius: .2em; 168 | } 169 | 170 | #update_user .form-group .radio, 171 | #add_user .form-group .radio{ 172 | margin: 1em 2em; 173 | } 174 | 175 | /* adding style to radio buttons */ 176 | .radio input[type='radio']{ 177 | position: absolute; 178 | opacity: 0; 179 | } 180 | 181 | .radio input[type='radio'] + .radio-label:before{ 182 | content: ""; 183 | background: var(--border-btn); 184 | border-radius: 100%; 185 | border: 1px solid var(--border); 186 | display: inline-block; 187 | width: 1em; 188 | height: 1em; 189 | position: relative; 190 | top: -0em; 191 | margin-right: .5em; 192 | vertical-align: top; 193 | cursor: pointer; 194 | text-align: center; 195 | -webkit-transition: all 250ms ease; 196 | transition: all 250ms ease; 197 | } 198 | 199 | .radio input[type='radio']:checked + .radio-label:before{ 200 | background-color: #16db93; 201 | box-shadow: inset 0 0 0 4px #e9ecef; 202 | } 203 | 204 | .radio input[type='radio']:focus + .radio-label:before{ 205 | outline: none; 206 | border-color:#16db93; 207 | } 208 | 209 | .radio input[type='radio']:disabled + .radio-label:before{ 210 | box-shadow: inset 0 0 0 4px #e9ecef; 211 | border-color: #b4b4b4; 212 | background: #b4b4b4; 213 | } 214 | 215 | #update_user .form-group .btn, 216 | #add_user .form-group .btn{ 217 | width: 100%; 218 | padding: .9em 1em; 219 | background-color:#16db93; 220 | border: none; 221 | font-family: 'PT Sans', sans-serif; 222 | font-size: 1em; 223 | cursor: pointer; 224 | border-radius: .2em; 225 | margin: .5em 0; 226 | } 227 | 228 | #update_user .form-group .btn:hover, 229 | #add_user .form-group .btn:hover{ 230 | background-color: var(--dark); 231 | color: var(--border); 232 | } 233 | -------------------------------------------------------------------------------- /assets/js/index.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $("#add_user").submit(function(event){ 5 | alert("Data Inserted Successfully!"); 6 | }) 7 | 8 | $("#update_user").submit(function(event){ 9 | event.preventDefault(); 10 | 11 | var unindexed_array = $(this).serializeArray(); 12 | var data = {} 13 | 14 | $.map(unindexed_array, function(n, i){ 15 | data[n['name']] = n['value'] 16 | }) 17 | 18 | 19 | var request = { 20 | "url" : `http://localhost:3000/api/users/${data.id}`, 21 | "method" : "PUT", 22 | "data" : data 23 | } 24 | 25 | $.ajax(request).done(function(response){ 26 | alert("Data Updated Successfully!"); 27 | }) 28 | 29 | }) 30 | 31 | if(window.location.pathname == "/"){ 32 | $ondelete = $(".table tbody td a.delete"); 33 | $ondelete.click(function(){ 34 | var id = $(this).attr("data-id") 35 | 36 | var request = { 37 | "url" : `http://localhost:3000/api/users/${id}`, 38 | "method" : "DELETE" 39 | } 40 | 41 | if(confirm("Do you really want to delete this record?")){ 42 | $.ajax(request).done(function(response){ 43 | alert("Data Deleted Successfully!"); 44 | location.reload(); 45 | }) 46 | } 47 | 48 | }) 49 | } -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "crud_app", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@sindresorhus/is": { 8 | "version": "0.14.0", 9 | "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", 10 | "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" 11 | }, 12 | "@szmarczak/http-timer": { 13 | "version": "1.1.2", 14 | "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", 15 | "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", 16 | "requires": { 17 | "defer-to-connect": "^1.0.1" 18 | } 19 | }, 20 | "abbrev": { 21 | "version": "1.1.1", 22 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", 23 | "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" 24 | }, 25 | "accepts": { 26 | "version": "1.3.7", 27 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", 28 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", 29 | "requires": { 30 | "mime-types": "~2.1.24", 31 | "negotiator": "0.6.2" 32 | } 33 | }, 34 | "ansi-align": { 35 | "version": "3.0.0", 36 | "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", 37 | "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", 38 | "requires": { 39 | "string-width": "^3.0.0" 40 | }, 41 | "dependencies": { 42 | "string-width": { 43 | "version": "3.1.0", 44 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 45 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 46 | "requires": { 47 | "emoji-regex": "^7.0.1", 48 | "is-fullwidth-code-point": "^2.0.0", 49 | "strip-ansi": "^5.1.0" 50 | } 51 | } 52 | } 53 | }, 54 | "ansi-regex": { 55 | "version": "4.1.0", 56 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", 57 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" 58 | }, 59 | "ansi-styles": { 60 | "version": "3.2.1", 61 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 62 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 63 | "requires": { 64 | "color-convert": "^1.9.0" 65 | } 66 | }, 67 | "anymatch": { 68 | "version": "3.1.1", 69 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", 70 | "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", 71 | "requires": { 72 | "normalize-path": "^3.0.0", 73 | "picomatch": "^2.0.4" 74 | } 75 | }, 76 | "array-flatten": { 77 | "version": "1.1.1", 78 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 79 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 80 | }, 81 | "async": { 82 | "version": "0.9.2", 83 | "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", 84 | "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" 85 | }, 86 | "axios": { 87 | "version": "0.21.0", 88 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.0.tgz", 89 | "integrity": "sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw==", 90 | "requires": { 91 | "follow-redirects": "^1.10.0" 92 | } 93 | }, 94 | "balanced-match": { 95 | "version": "1.0.0", 96 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 97 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" 98 | }, 99 | "basic-auth": { 100 | "version": "2.0.1", 101 | "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", 102 | "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", 103 | "requires": { 104 | "safe-buffer": "5.1.2" 105 | } 106 | }, 107 | "binary-extensions": { 108 | "version": "2.1.0", 109 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", 110 | "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" 111 | }, 112 | "bl": { 113 | "version": "2.2.1", 114 | "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", 115 | "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", 116 | "requires": { 117 | "readable-stream": "^2.3.5", 118 | "safe-buffer": "^5.1.1" 119 | } 120 | }, 121 | "bluebird": { 122 | "version": "3.5.1", 123 | "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", 124 | "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" 125 | }, 126 | "body-parser": { 127 | "version": "1.19.0", 128 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", 129 | "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", 130 | "requires": { 131 | "bytes": "3.1.0", 132 | "content-type": "~1.0.4", 133 | "debug": "2.6.9", 134 | "depd": "~1.1.2", 135 | "http-errors": "1.7.2", 136 | "iconv-lite": "0.4.24", 137 | "on-finished": "~2.3.0", 138 | "qs": "6.7.0", 139 | "raw-body": "2.4.0", 140 | "type-is": "~1.6.17" 141 | } 142 | }, 143 | "boxen": { 144 | "version": "4.2.0", 145 | "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", 146 | "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", 147 | "requires": { 148 | "ansi-align": "^3.0.0", 149 | "camelcase": "^5.3.1", 150 | "chalk": "^3.0.0", 151 | "cli-boxes": "^2.2.0", 152 | "string-width": "^4.1.0", 153 | "term-size": "^2.1.0", 154 | "type-fest": "^0.8.1", 155 | "widest-line": "^3.1.0" 156 | }, 157 | "dependencies": { 158 | "ansi-styles": { 159 | "version": "4.3.0", 160 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 161 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 162 | "requires": { 163 | "color-convert": "^2.0.1" 164 | } 165 | }, 166 | "chalk": { 167 | "version": "3.0.0", 168 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", 169 | "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", 170 | "requires": { 171 | "ansi-styles": "^4.1.0", 172 | "supports-color": "^7.1.0" 173 | } 174 | }, 175 | "color-convert": { 176 | "version": "2.0.1", 177 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 178 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 179 | "requires": { 180 | "color-name": "~1.1.4" 181 | } 182 | }, 183 | "color-name": { 184 | "version": "1.1.4", 185 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 186 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 187 | }, 188 | "has-flag": { 189 | "version": "4.0.0", 190 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 191 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" 192 | }, 193 | "supports-color": { 194 | "version": "7.2.0", 195 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 196 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 197 | "requires": { 198 | "has-flag": "^4.0.0" 199 | } 200 | } 201 | } 202 | }, 203 | "brace-expansion": { 204 | "version": "1.1.11", 205 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 206 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 207 | "requires": { 208 | "balanced-match": "^1.0.0", 209 | "concat-map": "0.0.1" 210 | } 211 | }, 212 | "braces": { 213 | "version": "3.0.2", 214 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 215 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 216 | "requires": { 217 | "fill-range": "^7.0.1" 218 | } 219 | }, 220 | "bson": { 221 | "version": "1.1.5", 222 | "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.5.tgz", 223 | "integrity": "sha512-kDuEzldR21lHciPQAIulLs1LZlCXdLziXI6Mb/TDkwXhb//UORJNPXgcRs2CuO4H0DcMkpfT3/ySsP3unoZjBg==" 224 | }, 225 | "bytes": { 226 | "version": "3.1.0", 227 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", 228 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" 229 | }, 230 | "cacheable-request": { 231 | "version": "6.1.0", 232 | "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", 233 | "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", 234 | "requires": { 235 | "clone-response": "^1.0.2", 236 | "get-stream": "^5.1.0", 237 | "http-cache-semantics": "^4.0.0", 238 | "keyv": "^3.0.0", 239 | "lowercase-keys": "^2.0.0", 240 | "normalize-url": "^4.1.0", 241 | "responselike": "^1.0.2" 242 | }, 243 | "dependencies": { 244 | "get-stream": { 245 | "version": "5.2.0", 246 | "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", 247 | "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", 248 | "requires": { 249 | "pump": "^3.0.0" 250 | } 251 | }, 252 | "lowercase-keys": { 253 | "version": "2.0.0", 254 | "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", 255 | "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" 256 | } 257 | } 258 | }, 259 | "camelcase": { 260 | "version": "5.3.1", 261 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", 262 | "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" 263 | }, 264 | "chalk": { 265 | "version": "2.4.2", 266 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 267 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 268 | "requires": { 269 | "ansi-styles": "^3.2.1", 270 | "escape-string-regexp": "^1.0.5", 271 | "supports-color": "^5.3.0" 272 | } 273 | }, 274 | "chokidar": { 275 | "version": "3.4.3", 276 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", 277 | "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", 278 | "requires": { 279 | "anymatch": "~3.1.1", 280 | "braces": "~3.0.2", 281 | "fsevents": "~2.1.2", 282 | "glob-parent": "~5.1.0", 283 | "is-binary-path": "~2.1.0", 284 | "is-glob": "~4.0.1", 285 | "normalize-path": "~3.0.0", 286 | "readdirp": "~3.5.0" 287 | } 288 | }, 289 | "ci-info": { 290 | "version": "2.0.0", 291 | "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", 292 | "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" 293 | }, 294 | "cli-boxes": { 295 | "version": "2.2.1", 296 | "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", 297 | "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==" 298 | }, 299 | "clone-response": { 300 | "version": "1.0.2", 301 | "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", 302 | "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", 303 | "requires": { 304 | "mimic-response": "^1.0.0" 305 | } 306 | }, 307 | "color-convert": { 308 | "version": "1.9.3", 309 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 310 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 311 | "requires": { 312 | "color-name": "1.1.3" 313 | } 314 | }, 315 | "color-name": { 316 | "version": "1.1.3", 317 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 318 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" 319 | }, 320 | "concat-map": { 321 | "version": "0.0.1", 322 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 323 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 324 | }, 325 | "configstore": { 326 | "version": "5.0.1", 327 | "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", 328 | "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", 329 | "requires": { 330 | "dot-prop": "^5.2.0", 331 | "graceful-fs": "^4.1.2", 332 | "make-dir": "^3.0.0", 333 | "unique-string": "^2.0.0", 334 | "write-file-atomic": "^3.0.0", 335 | "xdg-basedir": "^4.0.0" 336 | } 337 | }, 338 | "content-disposition": { 339 | "version": "0.5.3", 340 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", 341 | "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", 342 | "requires": { 343 | "safe-buffer": "5.1.2" 344 | } 345 | }, 346 | "content-type": { 347 | "version": "1.0.4", 348 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 349 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 350 | }, 351 | "cookie": { 352 | "version": "0.4.0", 353 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", 354 | "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" 355 | }, 356 | "cookie-signature": { 357 | "version": "1.0.6", 358 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 359 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 360 | }, 361 | "core-util-is": { 362 | "version": "1.0.2", 363 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 364 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 365 | }, 366 | "crypto-random-string": { 367 | "version": "2.0.0", 368 | "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", 369 | "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==" 370 | }, 371 | "debug": { 372 | "version": "2.6.9", 373 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 374 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 375 | "requires": { 376 | "ms": "2.0.0" 377 | } 378 | }, 379 | "decompress-response": { 380 | "version": "3.3.0", 381 | "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", 382 | "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", 383 | "requires": { 384 | "mimic-response": "^1.0.0" 385 | } 386 | }, 387 | "deep-extend": { 388 | "version": "0.6.0", 389 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", 390 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" 391 | }, 392 | "defer-to-connect": { 393 | "version": "1.1.3", 394 | "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", 395 | "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" 396 | }, 397 | "denque": { 398 | "version": "1.4.1", 399 | "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", 400 | "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" 401 | }, 402 | "depd": { 403 | "version": "1.1.2", 404 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 405 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" 406 | }, 407 | "destroy": { 408 | "version": "1.0.4", 409 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 410 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 411 | }, 412 | "dot-prop": { 413 | "version": "5.3.0", 414 | "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", 415 | "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", 416 | "requires": { 417 | "is-obj": "^2.0.0" 418 | } 419 | }, 420 | "dotenv": { 421 | "version": "8.2.0", 422 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", 423 | "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" 424 | }, 425 | "duplexer3": { 426 | "version": "0.1.4", 427 | "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", 428 | "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" 429 | }, 430 | "ee-first": { 431 | "version": "1.1.1", 432 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 433 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 434 | }, 435 | "ejs": { 436 | "version": "3.1.5", 437 | "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.5.tgz", 438 | "integrity": "sha512-dldq3ZfFtgVTJMLjOe+/3sROTzALlL9E34V4/sDtUd/KlBSS0s6U1/+WPE1B4sj9CXHJpL1M6rhNJnc9Wbal9w==", 439 | "requires": { 440 | "jake": "^10.6.1" 441 | } 442 | }, 443 | "emoji-regex": { 444 | "version": "7.0.3", 445 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", 446 | "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" 447 | }, 448 | "encodeurl": { 449 | "version": "1.0.2", 450 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 451 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 452 | }, 453 | "end-of-stream": { 454 | "version": "1.4.4", 455 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 456 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 457 | "requires": { 458 | "once": "^1.4.0" 459 | } 460 | }, 461 | "escape-goat": { 462 | "version": "2.1.1", 463 | "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", 464 | "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==" 465 | }, 466 | "escape-html": { 467 | "version": "1.0.3", 468 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 469 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 470 | }, 471 | "escape-string-regexp": { 472 | "version": "1.0.5", 473 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 474 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" 475 | }, 476 | "etag": { 477 | "version": "1.8.1", 478 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 479 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" 480 | }, 481 | "express": { 482 | "version": "4.17.1", 483 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", 484 | "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", 485 | "requires": { 486 | "accepts": "~1.3.7", 487 | "array-flatten": "1.1.1", 488 | "body-parser": "1.19.0", 489 | "content-disposition": "0.5.3", 490 | "content-type": "~1.0.4", 491 | "cookie": "0.4.0", 492 | "cookie-signature": "1.0.6", 493 | "debug": "2.6.9", 494 | "depd": "~1.1.2", 495 | "encodeurl": "~1.0.2", 496 | "escape-html": "~1.0.3", 497 | "etag": "~1.8.1", 498 | "finalhandler": "~1.1.2", 499 | "fresh": "0.5.2", 500 | "merge-descriptors": "1.0.1", 501 | "methods": "~1.1.2", 502 | "on-finished": "~2.3.0", 503 | "parseurl": "~1.3.3", 504 | "path-to-regexp": "0.1.7", 505 | "proxy-addr": "~2.0.5", 506 | "qs": "6.7.0", 507 | "range-parser": "~1.2.1", 508 | "safe-buffer": "5.1.2", 509 | "send": "0.17.1", 510 | "serve-static": "1.14.1", 511 | "setprototypeof": "1.1.1", 512 | "statuses": "~1.5.0", 513 | "type-is": "~1.6.18", 514 | "utils-merge": "1.0.1", 515 | "vary": "~1.1.2" 516 | } 517 | }, 518 | "filelist": { 519 | "version": "1.0.1", 520 | "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.1.tgz", 521 | "integrity": "sha512-8zSK6Nu0DQIC08mUC46sWGXi+q3GGpKydAG36k+JDba6VRpkevvOWUW5a/PhShij4+vHT9M+ghgG7eM+a9JDUQ==", 522 | "requires": { 523 | "minimatch": "^3.0.4" 524 | } 525 | }, 526 | "fill-range": { 527 | "version": "7.0.1", 528 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 529 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 530 | "requires": { 531 | "to-regex-range": "^5.0.1" 532 | } 533 | }, 534 | "finalhandler": { 535 | "version": "1.1.2", 536 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", 537 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", 538 | "requires": { 539 | "debug": "2.6.9", 540 | "encodeurl": "~1.0.2", 541 | "escape-html": "~1.0.3", 542 | "on-finished": "~2.3.0", 543 | "parseurl": "~1.3.3", 544 | "statuses": "~1.5.0", 545 | "unpipe": "~1.0.0" 546 | } 547 | }, 548 | "follow-redirects": { 549 | "version": "1.13.0", 550 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", 551 | "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" 552 | }, 553 | "forwarded": { 554 | "version": "0.1.2", 555 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", 556 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" 557 | }, 558 | "fresh": { 559 | "version": "0.5.2", 560 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 561 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 562 | }, 563 | "fsevents": { 564 | "version": "2.1.3", 565 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", 566 | "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", 567 | "optional": true 568 | }, 569 | "get-stream": { 570 | "version": "4.1.0", 571 | "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", 572 | "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", 573 | "requires": { 574 | "pump": "^3.0.0" 575 | } 576 | }, 577 | "glob-parent": { 578 | "version": "5.1.1", 579 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", 580 | "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", 581 | "requires": { 582 | "is-glob": "^4.0.1" 583 | } 584 | }, 585 | "global-dirs": { 586 | "version": "2.0.1", 587 | "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", 588 | "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", 589 | "requires": { 590 | "ini": "^1.3.5" 591 | } 592 | }, 593 | "got": { 594 | "version": "9.6.0", 595 | "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", 596 | "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", 597 | "requires": { 598 | "@sindresorhus/is": "^0.14.0", 599 | "@szmarczak/http-timer": "^1.1.2", 600 | "cacheable-request": "^6.0.0", 601 | "decompress-response": "^3.3.0", 602 | "duplexer3": "^0.1.4", 603 | "get-stream": "^4.1.0", 604 | "lowercase-keys": "^1.0.1", 605 | "mimic-response": "^1.0.1", 606 | "p-cancelable": "^1.0.0", 607 | "to-readable-stream": "^1.0.0", 608 | "url-parse-lax": "^3.0.0" 609 | } 610 | }, 611 | "graceful-fs": { 612 | "version": "4.2.4", 613 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", 614 | "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" 615 | }, 616 | "has-flag": { 617 | "version": "3.0.0", 618 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 619 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" 620 | }, 621 | "has-yarn": { 622 | "version": "2.1.0", 623 | "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", 624 | "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==" 625 | }, 626 | "http-cache-semantics": { 627 | "version": "4.1.0", 628 | "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", 629 | "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" 630 | }, 631 | "http-errors": { 632 | "version": "1.7.2", 633 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", 634 | "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", 635 | "requires": { 636 | "depd": "~1.1.2", 637 | "inherits": "2.0.3", 638 | "setprototypeof": "1.1.1", 639 | "statuses": ">= 1.5.0 < 2", 640 | "toidentifier": "1.0.0" 641 | } 642 | }, 643 | "iconv-lite": { 644 | "version": "0.4.24", 645 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 646 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 647 | "requires": { 648 | "safer-buffer": ">= 2.1.2 < 3" 649 | } 650 | }, 651 | "ignore-by-default": { 652 | "version": "1.0.1", 653 | "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", 654 | "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=" 655 | }, 656 | "import-lazy": { 657 | "version": "2.1.0", 658 | "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", 659 | "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=" 660 | }, 661 | "imurmurhash": { 662 | "version": "0.1.4", 663 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 664 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" 665 | }, 666 | "inherits": { 667 | "version": "2.0.3", 668 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 669 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 670 | }, 671 | "ini": { 672 | "version": "1.3.5", 673 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", 674 | "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" 675 | }, 676 | "ipaddr.js": { 677 | "version": "1.9.1", 678 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 679 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" 680 | }, 681 | "is-binary-path": { 682 | "version": "2.1.0", 683 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 684 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 685 | "requires": { 686 | "binary-extensions": "^2.0.0" 687 | } 688 | }, 689 | "is-ci": { 690 | "version": "2.0.0", 691 | "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", 692 | "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", 693 | "requires": { 694 | "ci-info": "^2.0.0" 695 | } 696 | }, 697 | "is-extglob": { 698 | "version": "2.1.1", 699 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 700 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" 701 | }, 702 | "is-fullwidth-code-point": { 703 | "version": "2.0.0", 704 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 705 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" 706 | }, 707 | "is-glob": { 708 | "version": "4.0.1", 709 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 710 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 711 | "requires": { 712 | "is-extglob": "^2.1.1" 713 | } 714 | }, 715 | "is-installed-globally": { 716 | "version": "0.3.2", 717 | "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", 718 | "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", 719 | "requires": { 720 | "global-dirs": "^2.0.1", 721 | "is-path-inside": "^3.0.1" 722 | } 723 | }, 724 | "is-npm": { 725 | "version": "4.0.0", 726 | "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", 727 | "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==" 728 | }, 729 | "is-number": { 730 | "version": "7.0.0", 731 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 732 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" 733 | }, 734 | "is-obj": { 735 | "version": "2.0.0", 736 | "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", 737 | "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" 738 | }, 739 | "is-path-inside": { 740 | "version": "3.0.2", 741 | "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", 742 | "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==" 743 | }, 744 | "is-typedarray": { 745 | "version": "1.0.0", 746 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 747 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" 748 | }, 749 | "is-yarn-global": { 750 | "version": "0.3.0", 751 | "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", 752 | "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==" 753 | }, 754 | "isarray": { 755 | "version": "1.0.0", 756 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 757 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 758 | }, 759 | "jake": { 760 | "version": "10.8.2", 761 | "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.2.tgz", 762 | "integrity": "sha512-eLpKyrfG3mzvGE2Du8VoPbeSkRry093+tyNjdYaBbJS9v17knImYGNXQCUV0gLxQtF82m3E8iRb/wdSQZLoq7A==", 763 | "requires": { 764 | "async": "0.9.x", 765 | "chalk": "^2.4.2", 766 | "filelist": "^1.0.1", 767 | "minimatch": "^3.0.4" 768 | } 769 | }, 770 | "json-buffer": { 771 | "version": "3.0.0", 772 | "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", 773 | "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" 774 | }, 775 | "kareem": { 776 | "version": "2.3.1", 777 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.1.tgz", 778 | "integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==" 779 | }, 780 | "keyv": { 781 | "version": "3.1.0", 782 | "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", 783 | "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", 784 | "requires": { 785 | "json-buffer": "3.0.0" 786 | } 787 | }, 788 | "latest-version": { 789 | "version": "5.1.0", 790 | "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", 791 | "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", 792 | "requires": { 793 | "package-json": "^6.3.0" 794 | } 795 | }, 796 | "lowercase-keys": { 797 | "version": "1.0.1", 798 | "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", 799 | "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" 800 | }, 801 | "make-dir": { 802 | "version": "3.1.0", 803 | "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", 804 | "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", 805 | "requires": { 806 | "semver": "^6.0.0" 807 | }, 808 | "dependencies": { 809 | "semver": { 810 | "version": "6.3.0", 811 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 812 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" 813 | } 814 | } 815 | }, 816 | "media-typer": { 817 | "version": "0.3.0", 818 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 819 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" 820 | }, 821 | "memory-pager": { 822 | "version": "1.5.0", 823 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", 824 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", 825 | "optional": true 826 | }, 827 | "merge-descriptors": { 828 | "version": "1.0.1", 829 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 830 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" 831 | }, 832 | "methods": { 833 | "version": "1.1.2", 834 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 835 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 836 | }, 837 | "mime": { 838 | "version": "1.6.0", 839 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 840 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 841 | }, 842 | "mime-db": { 843 | "version": "1.44.0", 844 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", 845 | "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" 846 | }, 847 | "mime-types": { 848 | "version": "2.1.27", 849 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", 850 | "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", 851 | "requires": { 852 | "mime-db": "1.44.0" 853 | } 854 | }, 855 | "mimic-response": { 856 | "version": "1.0.1", 857 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", 858 | "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" 859 | }, 860 | "minimatch": { 861 | "version": "3.0.4", 862 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 863 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 864 | "requires": { 865 | "brace-expansion": "^1.1.7" 866 | } 867 | }, 868 | "minimist": { 869 | "version": "1.2.5", 870 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 871 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" 872 | }, 873 | "mongodb": { 874 | "version": "3.6.2", 875 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.2.tgz", 876 | "integrity": "sha512-sSZOb04w3HcnrrXC82NEh/YGCmBuRgR+C1hZgmmv4L6dBz4BkRse6Y8/q/neXer9i95fKUBbFi4KgeceXmbsOA==", 877 | "requires": { 878 | "bl": "^2.2.1", 879 | "bson": "^1.1.4", 880 | "denque": "^1.4.1", 881 | "require_optional": "^1.0.1", 882 | "safe-buffer": "^5.1.2", 883 | "saslprep": "^1.0.0" 884 | } 885 | }, 886 | "mongoose": { 887 | "version": "5.10.11", 888 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.10.11.tgz", 889 | "integrity": "sha512-R5BFitKW94/S/Z48w+X+qi/eto66jWBcVEVA8nYVkBoBAPFGq7JSYP/0uso+ZHs+7XjSzTuui+SUllzxIrf9yA==", 890 | "requires": { 891 | "bson": "^1.1.4", 892 | "kareem": "2.3.1", 893 | "mongodb": "3.6.2", 894 | "mongoose-legacy-pluralize": "1.0.2", 895 | "mpath": "0.7.0", 896 | "mquery": "3.2.2", 897 | "ms": "2.1.2", 898 | "regexp-clone": "1.0.0", 899 | "safe-buffer": "5.2.1", 900 | "sift": "7.0.1", 901 | "sliced": "1.0.1" 902 | }, 903 | "dependencies": { 904 | "ms": { 905 | "version": "2.1.2", 906 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 907 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 908 | }, 909 | "safe-buffer": { 910 | "version": "5.2.1", 911 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 912 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" 913 | } 914 | } 915 | }, 916 | "mongoose-legacy-pluralize": { 917 | "version": "1.0.2", 918 | "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", 919 | "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" 920 | }, 921 | "morgan": { 922 | "version": "1.10.0", 923 | "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", 924 | "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", 925 | "requires": { 926 | "basic-auth": "~2.0.1", 927 | "debug": "2.6.9", 928 | "depd": "~2.0.0", 929 | "on-finished": "~2.3.0", 930 | "on-headers": "~1.0.2" 931 | }, 932 | "dependencies": { 933 | "depd": { 934 | "version": "2.0.0", 935 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 936 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" 937 | } 938 | } 939 | }, 940 | "mpath": { 941 | "version": "0.7.0", 942 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.7.0.tgz", 943 | "integrity": "sha512-Aiq04hILxhz1L+f7sjGyn7IxYzWm1zLNNXcfhDtx04kZ2Gk7uvFdgZ8ts1cWa/6d0TQmag2yR8zSGZUmp0tFNg==" 944 | }, 945 | "mquery": { 946 | "version": "3.2.2", 947 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.2.tgz", 948 | "integrity": "sha512-XB52992COp0KP230I3qloVUbkLUxJIu328HBP2t2EsxSFtf4W1HPSOBWOXf1bqxK4Xbb66lfMJ+Bpfd9/yZE1Q==", 949 | "requires": { 950 | "bluebird": "3.5.1", 951 | "debug": "3.1.0", 952 | "regexp-clone": "^1.0.0", 953 | "safe-buffer": "5.1.2", 954 | "sliced": "1.0.1" 955 | }, 956 | "dependencies": { 957 | "debug": { 958 | "version": "3.1.0", 959 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 960 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 961 | "requires": { 962 | "ms": "2.0.0" 963 | } 964 | } 965 | } 966 | }, 967 | "ms": { 968 | "version": "2.0.0", 969 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 970 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 971 | }, 972 | "negotiator": { 973 | "version": "0.6.2", 974 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", 975 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" 976 | }, 977 | "nodemon": { 978 | "version": "2.0.6", 979 | "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.6.tgz", 980 | "integrity": "sha512-4I3YDSKXg6ltYpcnZeHompqac4E6JeAMpGm8tJnB9Y3T0ehasLa4139dJOcCrB93HHrUMsCrKtoAlXTqT5n4AQ==", 981 | "requires": { 982 | "chokidar": "^3.2.2", 983 | "debug": "^3.2.6", 984 | "ignore-by-default": "^1.0.1", 985 | "minimatch": "^3.0.4", 986 | "pstree.remy": "^1.1.7", 987 | "semver": "^5.7.1", 988 | "supports-color": "^5.5.0", 989 | "touch": "^3.1.0", 990 | "undefsafe": "^2.0.3", 991 | "update-notifier": "^4.1.0" 992 | }, 993 | "dependencies": { 994 | "debug": { 995 | "version": "3.2.6", 996 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", 997 | "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", 998 | "requires": { 999 | "ms": "^2.1.1" 1000 | } 1001 | }, 1002 | "ms": { 1003 | "version": "2.1.2", 1004 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1005 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 1006 | } 1007 | } 1008 | }, 1009 | "nopt": { 1010 | "version": "1.0.10", 1011 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", 1012 | "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", 1013 | "requires": { 1014 | "abbrev": "1" 1015 | } 1016 | }, 1017 | "normalize-path": { 1018 | "version": "3.0.0", 1019 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1020 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" 1021 | }, 1022 | "normalize-url": { 1023 | "version": "4.5.0", 1024 | "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", 1025 | "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" 1026 | }, 1027 | "on-finished": { 1028 | "version": "2.3.0", 1029 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 1030 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 1031 | "requires": { 1032 | "ee-first": "1.1.1" 1033 | } 1034 | }, 1035 | "on-headers": { 1036 | "version": "1.0.2", 1037 | "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", 1038 | "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" 1039 | }, 1040 | "once": { 1041 | "version": "1.4.0", 1042 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1043 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1044 | "requires": { 1045 | "wrappy": "1" 1046 | } 1047 | }, 1048 | "p-cancelable": { 1049 | "version": "1.1.0", 1050 | "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", 1051 | "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" 1052 | }, 1053 | "package-json": { 1054 | "version": "6.5.0", 1055 | "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", 1056 | "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", 1057 | "requires": { 1058 | "got": "^9.6.0", 1059 | "registry-auth-token": "^4.0.0", 1060 | "registry-url": "^5.0.0", 1061 | "semver": "^6.2.0" 1062 | }, 1063 | "dependencies": { 1064 | "semver": { 1065 | "version": "6.3.0", 1066 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 1067 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" 1068 | } 1069 | } 1070 | }, 1071 | "parseurl": { 1072 | "version": "1.3.3", 1073 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 1074 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 1075 | }, 1076 | "path-to-regexp": { 1077 | "version": "0.1.7", 1078 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 1079 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 1080 | }, 1081 | "picomatch": { 1082 | "version": "2.2.2", 1083 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", 1084 | "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" 1085 | }, 1086 | "prepend-http": { 1087 | "version": "2.0.0", 1088 | "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", 1089 | "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" 1090 | }, 1091 | "process-nextick-args": { 1092 | "version": "2.0.1", 1093 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 1094 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" 1095 | }, 1096 | "proxy-addr": { 1097 | "version": "2.0.6", 1098 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", 1099 | "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", 1100 | "requires": { 1101 | "forwarded": "~0.1.2", 1102 | "ipaddr.js": "1.9.1" 1103 | } 1104 | }, 1105 | "pstree.remy": { 1106 | "version": "1.1.8", 1107 | "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", 1108 | "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" 1109 | }, 1110 | "pump": { 1111 | "version": "3.0.0", 1112 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 1113 | "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 1114 | "requires": { 1115 | "end-of-stream": "^1.1.0", 1116 | "once": "^1.3.1" 1117 | } 1118 | }, 1119 | "pupa": { 1120 | "version": "2.1.1", 1121 | "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", 1122 | "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", 1123 | "requires": { 1124 | "escape-goat": "^2.0.0" 1125 | } 1126 | }, 1127 | "qs": { 1128 | "version": "6.7.0", 1129 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", 1130 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" 1131 | }, 1132 | "range-parser": { 1133 | "version": "1.2.1", 1134 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 1135 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 1136 | }, 1137 | "raw-body": { 1138 | "version": "2.4.0", 1139 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", 1140 | "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", 1141 | "requires": { 1142 | "bytes": "3.1.0", 1143 | "http-errors": "1.7.2", 1144 | "iconv-lite": "0.4.24", 1145 | "unpipe": "1.0.0" 1146 | } 1147 | }, 1148 | "rc": { 1149 | "version": "1.2.8", 1150 | "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", 1151 | "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", 1152 | "requires": { 1153 | "deep-extend": "^0.6.0", 1154 | "ini": "~1.3.0", 1155 | "minimist": "^1.2.0", 1156 | "strip-json-comments": "~2.0.1" 1157 | } 1158 | }, 1159 | "readable-stream": { 1160 | "version": "2.3.7", 1161 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", 1162 | "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", 1163 | "requires": { 1164 | "core-util-is": "~1.0.0", 1165 | "inherits": "~2.0.3", 1166 | "isarray": "~1.0.0", 1167 | "process-nextick-args": "~2.0.0", 1168 | "safe-buffer": "~5.1.1", 1169 | "string_decoder": "~1.1.1", 1170 | "util-deprecate": "~1.0.1" 1171 | } 1172 | }, 1173 | "readdirp": { 1174 | "version": "3.5.0", 1175 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", 1176 | "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", 1177 | "requires": { 1178 | "picomatch": "^2.2.1" 1179 | } 1180 | }, 1181 | "regexp-clone": { 1182 | "version": "1.0.0", 1183 | "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", 1184 | "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" 1185 | }, 1186 | "registry-auth-token": { 1187 | "version": "4.2.0", 1188 | "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.0.tgz", 1189 | "integrity": "sha512-P+lWzPrsgfN+UEpDS3U8AQKg/UjZX6mQSJueZj3EK+vNESoqBSpBUD3gmu4sF9lOsjXWjF11dQKUqemf3veq1w==", 1190 | "requires": { 1191 | "rc": "^1.2.8" 1192 | } 1193 | }, 1194 | "registry-url": { 1195 | "version": "5.1.0", 1196 | "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", 1197 | "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", 1198 | "requires": { 1199 | "rc": "^1.2.8" 1200 | } 1201 | }, 1202 | "require_optional": { 1203 | "version": "1.0.1", 1204 | "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", 1205 | "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", 1206 | "requires": { 1207 | "resolve-from": "^2.0.0", 1208 | "semver": "^5.1.0" 1209 | } 1210 | }, 1211 | "resolve-from": { 1212 | "version": "2.0.0", 1213 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", 1214 | "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" 1215 | }, 1216 | "responselike": { 1217 | "version": "1.0.2", 1218 | "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", 1219 | "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", 1220 | "requires": { 1221 | "lowercase-keys": "^1.0.0" 1222 | } 1223 | }, 1224 | "safe-buffer": { 1225 | "version": "5.1.2", 1226 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1227 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 1228 | }, 1229 | "safer-buffer": { 1230 | "version": "2.1.2", 1231 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1232 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 1233 | }, 1234 | "saslprep": { 1235 | "version": "1.0.3", 1236 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", 1237 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", 1238 | "optional": true, 1239 | "requires": { 1240 | "sparse-bitfield": "^3.0.3" 1241 | } 1242 | }, 1243 | "semver": { 1244 | "version": "5.7.1", 1245 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 1246 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" 1247 | }, 1248 | "semver-diff": { 1249 | "version": "3.1.1", 1250 | "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", 1251 | "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", 1252 | "requires": { 1253 | "semver": "^6.3.0" 1254 | }, 1255 | "dependencies": { 1256 | "semver": { 1257 | "version": "6.3.0", 1258 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 1259 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" 1260 | } 1261 | } 1262 | }, 1263 | "send": { 1264 | "version": "0.17.1", 1265 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", 1266 | "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", 1267 | "requires": { 1268 | "debug": "2.6.9", 1269 | "depd": "~1.1.2", 1270 | "destroy": "~1.0.4", 1271 | "encodeurl": "~1.0.2", 1272 | "escape-html": "~1.0.3", 1273 | "etag": "~1.8.1", 1274 | "fresh": "0.5.2", 1275 | "http-errors": "~1.7.2", 1276 | "mime": "1.6.0", 1277 | "ms": "2.1.1", 1278 | "on-finished": "~2.3.0", 1279 | "range-parser": "~1.2.1", 1280 | "statuses": "~1.5.0" 1281 | }, 1282 | "dependencies": { 1283 | "ms": { 1284 | "version": "2.1.1", 1285 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 1286 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 1287 | } 1288 | } 1289 | }, 1290 | "serve-static": { 1291 | "version": "1.14.1", 1292 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", 1293 | "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", 1294 | "requires": { 1295 | "encodeurl": "~1.0.2", 1296 | "escape-html": "~1.0.3", 1297 | "parseurl": "~1.3.3", 1298 | "send": "0.17.1" 1299 | } 1300 | }, 1301 | "setprototypeof": { 1302 | "version": "1.1.1", 1303 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", 1304 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" 1305 | }, 1306 | "sift": { 1307 | "version": "7.0.1", 1308 | "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz", 1309 | "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" 1310 | }, 1311 | "signal-exit": { 1312 | "version": "3.0.3", 1313 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", 1314 | "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" 1315 | }, 1316 | "sliced": { 1317 | "version": "1.0.1", 1318 | "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", 1319 | "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" 1320 | }, 1321 | "sparse-bitfield": { 1322 | "version": "3.0.3", 1323 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", 1324 | "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", 1325 | "optional": true, 1326 | "requires": { 1327 | "memory-pager": "^1.0.2" 1328 | } 1329 | }, 1330 | "statuses": { 1331 | "version": "1.5.0", 1332 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 1333 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" 1334 | }, 1335 | "string-width": { 1336 | "version": "4.2.0", 1337 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", 1338 | "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", 1339 | "requires": { 1340 | "emoji-regex": "^8.0.0", 1341 | "is-fullwidth-code-point": "^3.0.0", 1342 | "strip-ansi": "^6.0.0" 1343 | }, 1344 | "dependencies": { 1345 | "ansi-regex": { 1346 | "version": "5.0.0", 1347 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 1348 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" 1349 | }, 1350 | "emoji-regex": { 1351 | "version": "8.0.0", 1352 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 1353 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" 1354 | }, 1355 | "is-fullwidth-code-point": { 1356 | "version": "3.0.0", 1357 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1358 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" 1359 | }, 1360 | "strip-ansi": { 1361 | "version": "6.0.0", 1362 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1363 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1364 | "requires": { 1365 | "ansi-regex": "^5.0.0" 1366 | } 1367 | } 1368 | } 1369 | }, 1370 | "string_decoder": { 1371 | "version": "1.1.1", 1372 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 1373 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 1374 | "requires": { 1375 | "safe-buffer": "~5.1.0" 1376 | } 1377 | }, 1378 | "strip-ansi": { 1379 | "version": "5.2.0", 1380 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 1381 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 1382 | "requires": { 1383 | "ansi-regex": "^4.1.0" 1384 | } 1385 | }, 1386 | "strip-json-comments": { 1387 | "version": "2.0.1", 1388 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 1389 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" 1390 | }, 1391 | "supports-color": { 1392 | "version": "5.5.0", 1393 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1394 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1395 | "requires": { 1396 | "has-flag": "^3.0.0" 1397 | } 1398 | }, 1399 | "term-size": { 1400 | "version": "2.2.1", 1401 | "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", 1402 | "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==" 1403 | }, 1404 | "to-readable-stream": { 1405 | "version": "1.0.0", 1406 | "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", 1407 | "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" 1408 | }, 1409 | "to-regex-range": { 1410 | "version": "5.0.1", 1411 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1412 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1413 | "requires": { 1414 | "is-number": "^7.0.0" 1415 | } 1416 | }, 1417 | "toidentifier": { 1418 | "version": "1.0.0", 1419 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", 1420 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" 1421 | }, 1422 | "touch": { 1423 | "version": "3.1.0", 1424 | "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", 1425 | "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", 1426 | "requires": { 1427 | "nopt": "~1.0.10" 1428 | } 1429 | }, 1430 | "type-fest": { 1431 | "version": "0.8.1", 1432 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", 1433 | "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" 1434 | }, 1435 | "type-is": { 1436 | "version": "1.6.18", 1437 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 1438 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1439 | "requires": { 1440 | "media-typer": "0.3.0", 1441 | "mime-types": "~2.1.24" 1442 | } 1443 | }, 1444 | "typedarray-to-buffer": { 1445 | "version": "3.1.5", 1446 | "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", 1447 | "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", 1448 | "requires": { 1449 | "is-typedarray": "^1.0.0" 1450 | } 1451 | }, 1452 | "undefsafe": { 1453 | "version": "2.0.3", 1454 | "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz", 1455 | "integrity": "sha512-nrXZwwXrD/T/JXeygJqdCO6NZZ1L66HrxM/Z7mIq2oPanoN0F1nLx3lwJMu6AwJY69hdixaFQOuoYsMjE5/C2A==", 1456 | "requires": { 1457 | "debug": "^2.2.0" 1458 | } 1459 | }, 1460 | "unique-string": { 1461 | "version": "2.0.0", 1462 | "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", 1463 | "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", 1464 | "requires": { 1465 | "crypto-random-string": "^2.0.0" 1466 | } 1467 | }, 1468 | "unpipe": { 1469 | "version": "1.0.0", 1470 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1471 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" 1472 | }, 1473 | "update-notifier": { 1474 | "version": "4.1.3", 1475 | "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz", 1476 | "integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==", 1477 | "requires": { 1478 | "boxen": "^4.2.0", 1479 | "chalk": "^3.0.0", 1480 | "configstore": "^5.0.1", 1481 | "has-yarn": "^2.1.0", 1482 | "import-lazy": "^2.1.0", 1483 | "is-ci": "^2.0.0", 1484 | "is-installed-globally": "^0.3.1", 1485 | "is-npm": "^4.0.0", 1486 | "is-yarn-global": "^0.3.0", 1487 | "latest-version": "^5.0.0", 1488 | "pupa": "^2.0.1", 1489 | "semver-diff": "^3.1.1", 1490 | "xdg-basedir": "^4.0.0" 1491 | }, 1492 | "dependencies": { 1493 | "ansi-styles": { 1494 | "version": "4.3.0", 1495 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1496 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1497 | "requires": { 1498 | "color-convert": "^2.0.1" 1499 | } 1500 | }, 1501 | "chalk": { 1502 | "version": "3.0.0", 1503 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", 1504 | "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", 1505 | "requires": { 1506 | "ansi-styles": "^4.1.0", 1507 | "supports-color": "^7.1.0" 1508 | } 1509 | }, 1510 | "color-convert": { 1511 | "version": "2.0.1", 1512 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1513 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1514 | "requires": { 1515 | "color-name": "~1.1.4" 1516 | } 1517 | }, 1518 | "color-name": { 1519 | "version": "1.1.4", 1520 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1521 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 1522 | }, 1523 | "has-flag": { 1524 | "version": "4.0.0", 1525 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1526 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" 1527 | }, 1528 | "supports-color": { 1529 | "version": "7.2.0", 1530 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1531 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1532 | "requires": { 1533 | "has-flag": "^4.0.0" 1534 | } 1535 | } 1536 | } 1537 | }, 1538 | "url-parse-lax": { 1539 | "version": "3.0.0", 1540 | "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", 1541 | "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", 1542 | "requires": { 1543 | "prepend-http": "^2.0.0" 1544 | } 1545 | }, 1546 | "util-deprecate": { 1547 | "version": "1.0.2", 1548 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1549 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 1550 | }, 1551 | "utils-merge": { 1552 | "version": "1.0.1", 1553 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1554 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 1555 | }, 1556 | "vary": { 1557 | "version": "1.1.2", 1558 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1559 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" 1560 | }, 1561 | "widest-line": { 1562 | "version": "3.1.0", 1563 | "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", 1564 | "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", 1565 | "requires": { 1566 | "string-width": "^4.0.0" 1567 | } 1568 | }, 1569 | "wrappy": { 1570 | "version": "1.0.2", 1571 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1572 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 1573 | }, 1574 | "write-file-atomic": { 1575 | "version": "3.0.3", 1576 | "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", 1577 | "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", 1578 | "requires": { 1579 | "imurmurhash": "^0.1.4", 1580 | "is-typedarray": "^1.0.0", 1581 | "signal-exit": "^3.0.2", 1582 | "typedarray-to-buffer": "^3.1.5" 1583 | } 1584 | }, 1585 | "xdg-basedir": { 1586 | "version": "4.0.0", 1587 | "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", 1588 | "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==" 1589 | } 1590 | } 1591 | } 1592 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "crud_app", 3 | "version": "1.0.0", 4 | "description": "crud application with express and mongodb", 5 | "main": "server.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "nodemon server.js" 9 | }, 10 | "keywords": [ 11 | "crud", 12 | "mongodb" 13 | ], 14 | "author": "akshay kashyap", 15 | "license": "ISC", 16 | "dependencies": { 17 | "axios": "^0.21.0", 18 | "body-parser": "^1.19.0", 19 | "dotenv": "^8.2.0", 20 | "ejs": "^3.1.5", 21 | "express": "^4.17.1", 22 | "mongoose": "^5.10.11", 23 | "morgan": "^1.10.0", 24 | "nodemon": "^2.0.6" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const dotenv = require('dotenv'); 3 | const morgan = require('morgan'); 4 | const bodyparser = require("body-parser"); 5 | const path = require('path'); 6 | 7 | const connectDB = require('./server/database/connection'); 8 | 9 | const app = express(); 10 | 11 | dotenv.config( { path : 'config.env'} ) 12 | const PORT = process.env.PORT || 8080 13 | 14 | // log requests 15 | app.use(morgan('tiny')); 16 | 17 | // mongodb connection 18 | connectDB(); 19 | 20 | // parse request to body-parser 21 | app.use(bodyparser.urlencoded({ extended : true})) 22 | 23 | // set view engine 24 | app.set("view engine", "ejs") 25 | //app.set("views", path.resolve(__dirname, "views/ejs")) 26 | 27 | // load assets 28 | app.use('/css', express.static(path.resolve(__dirname, "assets/css"))) 29 | app.use('/img', express.static(path.resolve(__dirname, "assets/img"))) 30 | app.use('/js', express.static(path.resolve(__dirname, "assets/js"))) 31 | 32 | // load routers 33 | app.use('/', require('./server/routes/router')) 34 | 35 | app.listen(PORT, ()=> { console.log(`Server is running on http://localhost:${PORT}`)}); -------------------------------------------------------------------------------- /server/controller/controller.js: -------------------------------------------------------------------------------- 1 | var Userdb = require('../model/model'); 2 | 3 | // create and save new user 4 | exports.create = (req,res)=>{ 5 | // validate request 6 | if(!req.body){ 7 | res.status(400).send({ message : "Content can not be emtpy!"}); 8 | return; 9 | } 10 | 11 | // new user 12 | const user = new Userdb({ 13 | name : req.body.name, 14 | email : req.body.email, 15 | gender: req.body.gender, 16 | status : req.body.status 17 | }) 18 | 19 | // save user in the database 20 | user 21 | .save(user) 22 | .then(data => { 23 | //res.send(data) 24 | res.redirect('/add-user'); 25 | }) 26 | .catch(err =>{ 27 | res.status(500).send({ 28 | message : err.message || "Some error occurred while creating a create operation" 29 | }); 30 | }); 31 | 32 | } 33 | 34 | // retrieve and return all users/ retrive and return a single user 35 | exports.find = (req, res)=>{ 36 | 37 | if(req.query.id){ 38 | const id = req.query.id; 39 | 40 | Userdb.findById(id) 41 | .then(data =>{ 42 | if(!data){ 43 | res.status(404).send({ message : "Not found user with id "+ id}) 44 | }else{ 45 | res.send(data) 46 | } 47 | }) 48 | .catch(err =>{ 49 | res.status(500).send({ message: "Erro retrieving user with id " + id}) 50 | }) 51 | 52 | }else{ 53 | Userdb.find() 54 | .then(user => { 55 | res.send(user) 56 | }) 57 | .catch(err => { 58 | res.status(500).send({ message : err.message || "Error Occurred while retriving user information" }) 59 | }) 60 | } 61 | 62 | 63 | } 64 | 65 | // Update a new idetified user by user id 66 | exports.update = (req, res)=>{ 67 | if(!req.body){ 68 | return res 69 | .status(400) 70 | .send({ message : "Data to update can not be empty"}) 71 | } 72 | 73 | const id = req.params.id; 74 | Userdb.findByIdAndUpdate(id, req.body, { useFindAndModify: false}) 75 | .then(data => { 76 | if(!data){ 77 | res.status(404).send({ message : `Cannot Update user with ${id}. Maybe user not found!`}) 78 | }else{ 79 | res.send(data) 80 | } 81 | }) 82 | .catch(err =>{ 83 | res.status(500).send({ message : "Error Update user information"}) 84 | }) 85 | } 86 | 87 | // Delete a user with specified user id in the request 88 | exports.delete = (req, res)=>{ 89 | const id = req.params.id; 90 | 91 | Userdb.findByIdAndDelete(id) 92 | .then(data => { 93 | if(!data){ 94 | res.status(404).send({ message : `Cannot Delete with id ${id}. Maybe id is wrong`}) 95 | }else{ 96 | res.send({ 97 | message : "User was deleted successfully!" 98 | }) 99 | } 100 | }) 101 | .catch(err =>{ 102 | res.status(500).send({ 103 | message: "Could not delete User with id=" + id 104 | }); 105 | }); 106 | } -------------------------------------------------------------------------------- /server/database/connection.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | const connectDB = async () => { 4 | try{ 5 | // mongodb connection string 6 | const con = await mongoose.connect(process.env.MONGO_URI, { 7 | useNewUrlParser: true, 8 | useUnifiedTopology: true, 9 | useFindAndModify: false, 10 | useCreateIndex: true 11 | }) 12 | 13 | console.log(`MongoDB connected : ${con.connection.host}`); 14 | }catch(err){ 15 | console.log(err); 16 | process.exit(1); 17 | } 18 | } 19 | 20 | module.exports = connectDB -------------------------------------------------------------------------------- /server/model/model.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | var schema = new mongoose.Schema({ 4 | name : { 5 | type : String, 6 | required: true 7 | }, 8 | email : { 9 | type: String, 10 | required: true, 11 | unique: true 12 | }, 13 | gender : String, 14 | status : String 15 | }) 16 | 17 | const Userdb = mongoose.model('userdb', schema); 18 | 19 | module.exports = Userdb; -------------------------------------------------------------------------------- /server/routes/router.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const route = express.Router() 3 | 4 | const services = require('../services/render'); 5 | const controller = require('../controller/controller'); 6 | 7 | /** 8 | * @description Root Route 9 | * @method GET / 10 | */ 11 | route.get('/', services.homeRoutes); 12 | 13 | /** 14 | * @description add users 15 | * @method GET /add-user 16 | */ 17 | route.get('/add-user', services.add_user) 18 | 19 | /** 20 | * @description for update user 21 | * @method GET /update-user 22 | */ 23 | route.get('/update-user', services.update_user) 24 | 25 | 26 | // API 27 | route.post('/api/users', controller.create); 28 | route.get('/api/users', controller.find); 29 | route.put('/api/users/:id', controller.update); 30 | route.delete('/api/users/:id', controller.delete); 31 | 32 | 33 | module.exports = route -------------------------------------------------------------------------------- /server/services/render.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | 3 | 4 | exports.homeRoutes = (req, res) => { 5 | // Make a get request to /api/users 6 | axios.get('http://localhost:3000/api/users') 7 | .then(function(response){ 8 | res.render('index', { users : response.data }); 9 | }) 10 | .catch(err =>{ 11 | res.send(err); 12 | }) 13 | 14 | 15 | } 16 | 17 | exports.add_user = (req, res) =>{ 18 | res.render('add_user'); 19 | } 20 | 21 | exports.update_user = (req, res) =>{ 22 | axios.get('http://localhost:3000/api/users', { params : { id : req.query.id }}) 23 | .then(function(userdata){ 24 | res.render("update_user", { user : userdata.data}) 25 | }) 26 | .catch(err =>{ 27 | res.send(err); 28 | }) 29 | } -------------------------------------------------------------------------------- /views/add_user.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- include('include/_header') %> 4 | 5 | 6 | 7 |
8 |
9 |
10 |
11 | All Users 12 |
13 |
14 |
15 |

New User

16 | Use the below form to create a new account 17 |
18 | 19 | 20 | <%- include('include/_form') %> 21 | 22 |
23 |
24 | 25 | 26 | 27 | <%- include('include/_footer') %> 28 | 29 | -------------------------------------------------------------------------------- /views/include/_footer.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /views/include/_form.ejs: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 6 | 7 | 8 |
9 |
10 | 11 | 12 |
13 |
14 | 15 |
16 | 17 | 18 |
19 |
20 | 21 | 22 |
23 |
24 | 25 |
26 | 27 |
28 | 29 | 30 |
31 |
32 | 33 | 34 |
35 |
36 | 37 |
38 | 39 |
40 | 41 |
42 |
-------------------------------------------------------------------------------- /views/include/_header.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CRUD Application 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 23 | 24 | -------------------------------------------------------------------------------- /views/include/_show.ejs: -------------------------------------------------------------------------------- 1 | <% for(var i = 0; i < users.length; i++) { %> 2 | 3 | <%= i + 1 %> 4 | <%= users[i].name %> 5 | <%= users[i].email %> 6 | <%= users[i].gender %> 7 | <%= users[i].status %> 8 | 9 | 10 | 11 | 12 | > 13 | 14 | 15 | 16 | 17 | <% } %> -------------------------------------------------------------------------------- /views/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- include('include/_header') %> 4 | 5 | 6 | 7 | 8 |
9 |
10 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | <%- include('include/_show') %> 31 | 32 |
IDName@EmailGenderStatusAction
33 |
34 |
35 |
36 | 37 | 38 | 39 | 40 | <%- include('include/_footer') %> 41 | -------------------------------------------------------------------------------- /views/update_user.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- include('include/_header') %> 4 | 5 | 6 | 7 |
8 |
9 |
10 |
11 | All Users 12 |
13 |
14 |
15 |

Update User

16 | Use the below form to Update an account 17 |
18 | 19 | 20 | 21 |
22 |
23 |
24 | 25 | 26 | 27 |
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 |
54 |
55 | 56 |
57 | 58 |
59 | 60 |
61 |
62 | 63 |
64 |
65 | 66 | 67 | 68 | <%- include('include/_footer') %> 69 | 70 | --------------------------------------------------------------------------------