├── client ├── book-list.html ├── book-list.js └── index.html └── server ├── book-api.js ├── hello-world.js ├── package-lock.json └── package.json /client/book-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

List of books

17 |
18 | 19 |
20 |
21 |
22 |
23 |
24 | 25 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /client/book-list.js: -------------------------------------------------------------------------------- 1 | const setEditModal = (isbn) => { 2 | const xhttp = new XMLHttpRequest(); 3 | 4 | xhttp.open("GET", `http://localhost:3000/book/${isbn}`, false); 5 | xhttp.send(); 6 | 7 | const book = JSON.parse(xhttp.responseText); 8 | 9 | const { 10 | title, 11 | author, 12 | publisher, 13 | publish_date, 14 | numOfPages 15 | } = book; 16 | 17 | document.getElementById('isbn').value = isbn; 18 | document.getElementById('title').value = title; 19 | document.getElementById('author').value = author; 20 | document.getElementById('publisher').value = publisher; 21 | document.getElementById('publish_date').value = publish_date; 22 | document.getElementById('numOfPages').value = numOfPages; 23 | 24 | // setting up the action url for the book 25 | document.getElementById('editForm').action = `http://localhost:3000/book/${isbn}`; 26 | } 27 | 28 | const deleteBook = (isbn) => { 29 | const xhttp = new XMLHttpRequest(); 30 | 31 | xhttp.open("DELETE", `http://localhost:3000/book/${isbn}`, false); 32 | xhttp.send(); 33 | 34 | location.reload(); 35 | } 36 | 37 | const loadBooks = () => { 38 | const xhttp = new XMLHttpRequest(); 39 | 40 | xhttp.open("GET", "http://localhost:3000/book", false); 41 | xhttp.send(); 42 | 43 | const books = JSON.parse(xhttp.responseText); 44 | 45 | for (let book of books) { 46 | const x = ` 47 |
48 |
49 |
50 |
${book.title}
51 |
${book.isbn}
52 | 53 |
Author: ${book.author}
54 |
Publisher: ${book.publisher}
55 |
Number Of Pages: ${book.numOfPages}
56 | 57 |
58 | 59 | 60 | 64 |
65 |
66 |
67 | ` 68 | 69 | document.getElementById('books').innerHTML = document.getElementById('books').innerHTML + x; 70 | } 71 | } 72 | 73 | loadBooks(); -------------------------------------------------------------------------------- /client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Create New Book 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

Create New Book

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 | -------------------------------------------------------------------------------- /server/book-api.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const bodyParser = require('body-parser'); 3 | const cors = require('cors'); 4 | 5 | const app = express() 6 | const port = 3000 7 | 8 | let books = [{ 9 | "isbn": "9781593275846", 10 | "title": "Eloquent JavaScript, Second Edition", 11 | "author": "Marijn Haverbeke", 12 | "publish_date": "2014-12-14", 13 | "publisher": "No Starch Press", 14 | "numOfPages": 472, 15 | }, 16 | { 17 | "isbn": "9781449331818", 18 | "title": "Learning JavaScript Design Patterns", 19 | "author": "Addy Osmani", 20 | "publish_date": "2012-07-01", 21 | "publisher": "O'Reilly Media", 22 | "numOfPages": 254, 23 | }, 24 | { 25 | "isbn": "9781449365035", 26 | "title": "Speaking JavaScript", 27 | "author": "Axel Rauschmayer", 28 | "publish_date": "2014-02-01", 29 | "publisher": "O'Reilly Media", 30 | "numOfPages": 460, 31 | }]; 32 | 33 | app.use(cors()); 34 | 35 | app.use(bodyParser.urlencoded({ extended: false })); 36 | app.use(bodyParser.json()); 37 | 38 | app.post('/book', (req, res) => { 39 | const book = req.body; 40 | 41 | // output the book to the console for debugging 42 | console.log(book); 43 | books.push(book); 44 | 45 | res.send('Book is added to the database'); 46 | }); 47 | 48 | app.get('/book', (req, res) => { 49 | res.json(books); 50 | }); 51 | 52 | app.get('/book/:isbn', (req, res) => { 53 | // reading isbn from the URL 54 | const isbn = req.params.isbn; 55 | 56 | // searching books for the isbn 57 | for (let book of books) { 58 | if (book.isbn === isbn) { 59 | res.json(book); 60 | return; 61 | } 62 | } 63 | 64 | // sending 404 when not found something is a good practice 65 | res.status(404).send('Book not found'); 66 | }); 67 | 68 | app.delete('/book/:isbn', (req, res) => { 69 | // reading isbn from the URL 70 | const isbn = req.params.isbn; 71 | 72 | // remove item from the books array 73 | books = books.filter(i => { 74 | if (i.isbn !== isbn) { 75 | return true; 76 | } 77 | 78 | return false; 79 | }); 80 | 81 | // sending 404 when not found something is a good practice 82 | res.send('Book is deleted'); 83 | }); 84 | 85 | app.post('/book/:isbn', (req, res) => { 86 | // reading isbn from the URL 87 | const isbn = req.params.isbn; 88 | const newBook = req.body; 89 | 90 | // remove item from the books array 91 | for (let i = 0; i < books.length; i++) { 92 | let book = books[i] 93 | 94 | if (book.isbn === isbn) { 95 | books[i] = newBook; 96 | } 97 | } 98 | 99 | // sending 404 when not found something is a good practice 100 | res.send('Book is edited'); 101 | }); 102 | 103 | app.listen(port, () => console.log(`Hello world app listening on port ${port}!`)); -------------------------------------------------------------------------------- /server/hello-world.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const app = express() 3 | const port = 3000 4 | 5 | app.get('/', (req, res) => { 6 | res.send('Hello World, from express'); 7 | }); 8 | 9 | app.listen(port, () => console.log(`Hello world app listening on port ${port}!`)); -------------------------------------------------------------------------------- /server/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "project", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "accepts": { 8 | "version": "1.3.7", 9 | "resolved": "http://localhost:4873/accepts/-/accepts-1.3.7.tgz", 10 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", 11 | "requires": { 12 | "mime-types": "~2.1.24", 13 | "negotiator": "0.6.2" 14 | } 15 | }, 16 | "array-flatten": { 17 | "version": "1.1.1", 18 | "resolved": "http://localhost:4873/array-flatten/-/array-flatten-1.1.1.tgz", 19 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 20 | }, 21 | "body-parser": { 22 | "version": "1.19.0", 23 | "resolved": "http://localhost:4873/body-parser/-/body-parser-1.19.0.tgz", 24 | "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", 25 | "requires": { 26 | "bytes": "3.1.0", 27 | "content-type": "~1.0.4", 28 | "debug": "2.6.9", 29 | "depd": "~1.1.2", 30 | "http-errors": "1.7.2", 31 | "iconv-lite": "0.4.24", 32 | "on-finished": "~2.3.0", 33 | "qs": "6.7.0", 34 | "raw-body": "2.4.0", 35 | "type-is": "~1.6.17" 36 | } 37 | }, 38 | "bytes": { 39 | "version": "3.1.0", 40 | "resolved": "http://localhost:4873/bytes/-/bytes-3.1.0.tgz", 41 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" 42 | }, 43 | "content-disposition": { 44 | "version": "0.5.3", 45 | "resolved": "http://localhost:4873/content-disposition/-/content-disposition-0.5.3.tgz", 46 | "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", 47 | "requires": { 48 | "safe-buffer": "5.1.2" 49 | } 50 | }, 51 | "content-type": { 52 | "version": "1.0.4", 53 | "resolved": "http://localhost:4873/content-type/-/content-type-1.0.4.tgz", 54 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 55 | }, 56 | "cookie": { 57 | "version": "0.4.0", 58 | "resolved": "http://localhost:4873/cookie/-/cookie-0.4.0.tgz", 59 | "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" 60 | }, 61 | "cookie-signature": { 62 | "version": "1.0.6", 63 | "resolved": "http://localhost:4873/cookie-signature/-/cookie-signature-1.0.6.tgz", 64 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 65 | }, 66 | "cors": { 67 | "version": "2.8.5", 68 | "resolved": "http://localhost:4873/cors/-/cors-2.8.5.tgz", 69 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", 70 | "requires": { 71 | "object-assign": "^4", 72 | "vary": "^1" 73 | } 74 | }, 75 | "debug": { 76 | "version": "2.6.9", 77 | "resolved": "http://localhost:4873/debug/-/debug-2.6.9.tgz", 78 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 79 | "requires": { 80 | "ms": "2.0.0" 81 | } 82 | }, 83 | "depd": { 84 | "version": "1.1.2", 85 | "resolved": "http://localhost:4873/depd/-/depd-1.1.2.tgz", 86 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" 87 | }, 88 | "destroy": { 89 | "version": "1.0.4", 90 | "resolved": "http://localhost:4873/destroy/-/destroy-1.0.4.tgz", 91 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 92 | }, 93 | "ee-first": { 94 | "version": "1.1.1", 95 | "resolved": "http://localhost:4873/ee-first/-/ee-first-1.1.1.tgz", 96 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 97 | }, 98 | "encodeurl": { 99 | "version": "1.0.2", 100 | "resolved": "http://localhost:4873/encodeurl/-/encodeurl-1.0.2.tgz", 101 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 102 | }, 103 | "escape-html": { 104 | "version": "1.0.3", 105 | "resolved": "http://localhost:4873/escape-html/-/escape-html-1.0.3.tgz", 106 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 107 | }, 108 | "etag": { 109 | "version": "1.8.1", 110 | "resolved": "http://localhost:4873/etag/-/etag-1.8.1.tgz", 111 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" 112 | }, 113 | "express": { 114 | "version": "4.17.1", 115 | "resolved": "http://localhost:4873/express/-/express-4.17.1.tgz", 116 | "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", 117 | "requires": { 118 | "accepts": "~1.3.7", 119 | "array-flatten": "1.1.1", 120 | "body-parser": "1.19.0", 121 | "content-disposition": "0.5.3", 122 | "content-type": "~1.0.4", 123 | "cookie": "0.4.0", 124 | "cookie-signature": "1.0.6", 125 | "debug": "2.6.9", 126 | "depd": "~1.1.2", 127 | "encodeurl": "~1.0.2", 128 | "escape-html": "~1.0.3", 129 | "etag": "~1.8.1", 130 | "finalhandler": "~1.1.2", 131 | "fresh": "0.5.2", 132 | "merge-descriptors": "1.0.1", 133 | "methods": "~1.1.2", 134 | "on-finished": "~2.3.0", 135 | "parseurl": "~1.3.3", 136 | "path-to-regexp": "0.1.7", 137 | "proxy-addr": "~2.0.5", 138 | "qs": "6.7.0", 139 | "range-parser": "~1.2.1", 140 | "safe-buffer": "5.1.2", 141 | "send": "0.17.1", 142 | "serve-static": "1.14.1", 143 | "setprototypeof": "1.1.1", 144 | "statuses": "~1.5.0", 145 | "type-is": "~1.6.18", 146 | "utils-merge": "1.0.1", 147 | "vary": "~1.1.2" 148 | } 149 | }, 150 | "finalhandler": { 151 | "version": "1.1.2", 152 | "resolved": "http://localhost:4873/finalhandler/-/finalhandler-1.1.2.tgz", 153 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", 154 | "requires": { 155 | "debug": "2.6.9", 156 | "encodeurl": "~1.0.2", 157 | "escape-html": "~1.0.3", 158 | "on-finished": "~2.3.0", 159 | "parseurl": "~1.3.3", 160 | "statuses": "~1.5.0", 161 | "unpipe": "~1.0.0" 162 | } 163 | }, 164 | "forwarded": { 165 | "version": "0.1.2", 166 | "resolved": "http://localhost:4873/forwarded/-/forwarded-0.1.2.tgz", 167 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" 168 | }, 169 | "fresh": { 170 | "version": "0.5.2", 171 | "resolved": "http://localhost:4873/fresh/-/fresh-0.5.2.tgz", 172 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 173 | }, 174 | "http-errors": { 175 | "version": "1.7.2", 176 | "resolved": "http://localhost:4873/http-errors/-/http-errors-1.7.2.tgz", 177 | "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", 178 | "requires": { 179 | "depd": "~1.1.2", 180 | "inherits": "2.0.3", 181 | "setprototypeof": "1.1.1", 182 | "statuses": ">= 1.5.0 < 2", 183 | "toidentifier": "1.0.0" 184 | } 185 | }, 186 | "iconv-lite": { 187 | "version": "0.4.24", 188 | "resolved": "http://localhost:4873/iconv-lite/-/iconv-lite-0.4.24.tgz", 189 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 190 | "requires": { 191 | "safer-buffer": ">= 2.1.2 < 3" 192 | } 193 | }, 194 | "inherits": { 195 | "version": "2.0.3", 196 | "resolved": "http://localhost:4873/inherits/-/inherits-2.0.3.tgz", 197 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 198 | }, 199 | "ipaddr.js": { 200 | "version": "1.9.0", 201 | "resolved": "http://localhost:4873/ipaddr.js/-/ipaddr.js-1.9.0.tgz", 202 | "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" 203 | }, 204 | "media-typer": { 205 | "version": "0.3.0", 206 | "resolved": "http://localhost:4873/media-typer/-/media-typer-0.3.0.tgz", 207 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" 208 | }, 209 | "merge-descriptors": { 210 | "version": "1.0.1", 211 | "resolved": "http://localhost:4873/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 212 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" 213 | }, 214 | "methods": { 215 | "version": "1.1.2", 216 | "resolved": "http://localhost:4873/methods/-/methods-1.1.2.tgz", 217 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 218 | }, 219 | "mime": { 220 | "version": "1.6.0", 221 | "resolved": "http://localhost:4873/mime/-/mime-1.6.0.tgz", 222 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 223 | }, 224 | "mime-db": { 225 | "version": "1.40.0", 226 | "resolved": "http://localhost:4873/mime-db/-/mime-db-1.40.0.tgz", 227 | "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" 228 | }, 229 | "mime-types": { 230 | "version": "2.1.24", 231 | "resolved": "http://localhost:4873/mime-types/-/mime-types-2.1.24.tgz", 232 | "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", 233 | "requires": { 234 | "mime-db": "1.40.0" 235 | } 236 | }, 237 | "ms": { 238 | "version": "2.0.0", 239 | "resolved": "http://localhost:4873/ms/-/ms-2.0.0.tgz", 240 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 241 | }, 242 | "negotiator": { 243 | "version": "0.6.2", 244 | "resolved": "http://localhost:4873/negotiator/-/negotiator-0.6.2.tgz", 245 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" 246 | }, 247 | "object-assign": { 248 | "version": "4.1.1", 249 | "resolved": "http://localhost:4873/object-assign/-/object-assign-4.1.1.tgz", 250 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 251 | }, 252 | "on-finished": { 253 | "version": "2.3.0", 254 | "resolved": "http://localhost:4873/on-finished/-/on-finished-2.3.0.tgz", 255 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 256 | "requires": { 257 | "ee-first": "1.1.1" 258 | } 259 | }, 260 | "parseurl": { 261 | "version": "1.3.3", 262 | "resolved": "http://localhost:4873/parseurl/-/parseurl-1.3.3.tgz", 263 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 264 | }, 265 | "path-to-regexp": { 266 | "version": "0.1.7", 267 | "resolved": "http://localhost:4873/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 268 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 269 | }, 270 | "proxy-addr": { 271 | "version": "2.0.5", 272 | "resolved": "http://localhost:4873/proxy-addr/-/proxy-addr-2.0.5.tgz", 273 | "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", 274 | "requires": { 275 | "forwarded": "~0.1.2", 276 | "ipaddr.js": "1.9.0" 277 | } 278 | }, 279 | "qs": { 280 | "version": "6.7.0", 281 | "resolved": "http://localhost:4873/qs/-/qs-6.7.0.tgz", 282 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" 283 | }, 284 | "range-parser": { 285 | "version": "1.2.1", 286 | "resolved": "http://localhost:4873/range-parser/-/range-parser-1.2.1.tgz", 287 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 288 | }, 289 | "raw-body": { 290 | "version": "2.4.0", 291 | "resolved": "http://localhost:4873/raw-body/-/raw-body-2.4.0.tgz", 292 | "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", 293 | "requires": { 294 | "bytes": "3.1.0", 295 | "http-errors": "1.7.2", 296 | "iconv-lite": "0.4.24", 297 | "unpipe": "1.0.0" 298 | } 299 | }, 300 | "safe-buffer": { 301 | "version": "5.1.2", 302 | "resolved": "http://localhost:4873/safe-buffer/-/safe-buffer-5.1.2.tgz", 303 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 304 | }, 305 | "safer-buffer": { 306 | "version": "2.1.2", 307 | "resolved": "http://localhost:4873/safer-buffer/-/safer-buffer-2.1.2.tgz", 308 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 309 | }, 310 | "send": { 311 | "version": "0.17.1", 312 | "resolved": "http://localhost:4873/send/-/send-0.17.1.tgz", 313 | "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", 314 | "requires": { 315 | "debug": "2.6.9", 316 | "depd": "~1.1.2", 317 | "destroy": "~1.0.4", 318 | "encodeurl": "~1.0.2", 319 | "escape-html": "~1.0.3", 320 | "etag": "~1.8.1", 321 | "fresh": "0.5.2", 322 | "http-errors": "~1.7.2", 323 | "mime": "1.6.0", 324 | "ms": "2.1.1", 325 | "on-finished": "~2.3.0", 326 | "range-parser": "~1.2.1", 327 | "statuses": "~1.5.0" 328 | }, 329 | "dependencies": { 330 | "ms": { 331 | "version": "2.1.1", 332 | "resolved": "http://localhost:4873/ms/-/ms-2.1.1.tgz", 333 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 334 | } 335 | } 336 | }, 337 | "serve-static": { 338 | "version": "1.14.1", 339 | "resolved": "http://localhost:4873/serve-static/-/serve-static-1.14.1.tgz", 340 | "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", 341 | "requires": { 342 | "encodeurl": "~1.0.2", 343 | "escape-html": "~1.0.3", 344 | "parseurl": "~1.3.3", 345 | "send": "0.17.1" 346 | } 347 | }, 348 | "setprototypeof": { 349 | "version": "1.1.1", 350 | "resolved": "http://localhost:4873/setprototypeof/-/setprototypeof-1.1.1.tgz", 351 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" 352 | }, 353 | "statuses": { 354 | "version": "1.5.0", 355 | "resolved": "http://localhost:4873/statuses/-/statuses-1.5.0.tgz", 356 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" 357 | }, 358 | "toidentifier": { 359 | "version": "1.0.0", 360 | "resolved": "http://localhost:4873/toidentifier/-/toidentifier-1.0.0.tgz", 361 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" 362 | }, 363 | "type-is": { 364 | "version": "1.6.18", 365 | "resolved": "http://localhost:4873/type-is/-/type-is-1.6.18.tgz", 366 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 367 | "requires": { 368 | "media-typer": "0.3.0", 369 | "mime-types": "~2.1.24" 370 | } 371 | }, 372 | "unpipe": { 373 | "version": "1.0.0", 374 | "resolved": "http://localhost:4873/unpipe/-/unpipe-1.0.0.tgz", 375 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" 376 | }, 377 | "utils-merge": { 378 | "version": "1.0.1", 379 | "resolved": "http://localhost:4873/utils-merge/-/utils-merge-1.0.1.tgz", 380 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 381 | }, 382 | "vary": { 383 | "version": "1.1.2", 384 | "resolved": "http://localhost:4873/vary/-/vary-1.1.2.tgz", 385 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" 386 | } 387 | } 388 | } 389 | -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "project", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "cors": "^2.8.5", 13 | "express": "^4.17.1" 14 | } 15 | } 16 | --------------------------------------------------------------------------------