├── .gitignore ├── README.md ├── index.js ├── package-lock.json ├── package.json └── requests ├── create_note.rest ├── delete_note.rest └── get_all_notes.rest /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | /dist 3 | .env 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Notes backend 2 | 3 | This repository contains the backend developed from part 3 onwards in the Full Stack course. The different stages of the application are saved in different branches. 4 | 5 | The Notes backend implements a RESTful HTTP interface and handles the management of notes. It is developed using Node and Express. The purpose is to develop a backend that works with the [frontend](https://github.com/fullstack-hy2020/part2-notes-frontend/tree/part3-1) developed in part 2 of the course. 6 | 7 | ## Running the application on your own machine 8 | 9 | You can easily try out the application on your own machine. The current version of the application is developed using Node version 22.3.0. For the best experience, it is recommended to use the same major version of Node, but the application will likely work with other Node versions as well. 10 | 11 | Follow these steps to run the application: 12 | 13 | 1. Clone this repository to your own machine with the command `git clone https://github.com/fullstack-hy2020/part3-notes-backend.git` 14 | 15 | 2. Navigate to the cloned repository with the command `cd part3-notes-backend` 16 | 17 | 3. Switch to the desired branch with the command `git switch ` 18 | 19 | 4. Install the node modules with the command `npm install` 20 | 21 | 5. If you are on branch part3-4 or later, you need to create a _.env_ file in the root of the project with the following content: 22 | 23 | ``` 24 | MONGODB_URI=your_database_connection_string 25 | PORT=3001 26 | ``` 27 | 28 | `MONGODB_URI` defines the database connection url and `PORT` defines the port on which the application will be started. 29 | 30 | 6. Start the application with the command `npm run dev`. By default, the application will start on port 3001, so it will be available at http://localhost:3001/. 31 | 32 | ## How to switch between branches? 33 | 34 | The different stages of the application are saved in different branches. Switching branches changes the code in your working directory to match the state of the branch you switched to. This allows you to work on different versions of the application without affecting the codebase of other branches. 35 | 36 | You can switch to the desired branch by running the command `git switch `, for example `git switch part3-2`. Note that new dependencies are added to the application as development progresses, so after switching branches, it is safest to run the command `npm install` to ensure that any missing node modules will be installed on your machine. 37 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const app = express() 3 | 4 | let notes = [ 5 | { 6 | id: '1', 7 | content: 'HTML is easy', 8 | important: true, 9 | }, 10 | { 11 | id: '2', 12 | content: 'Browser can execute only JavaScript', 13 | important: false, 14 | }, 15 | { 16 | id: '3', 17 | content: 'GET and POST are the most important methods of HTTP protocol', 18 | important: true, 19 | }, 20 | ] 21 | 22 | app.use(express.json()) 23 | 24 | app.get('/', (request, response) => { 25 | response.send('

Hello World!

') 26 | }) 27 | 28 | app.get('/api/notes', (request, response) => { 29 | response.json(notes) 30 | }) 31 | 32 | app.get('/api/notes/:id', (request, response) => { 33 | const id = request.params.id 34 | const note = notes.find((note) => note.id === id) 35 | 36 | if (note) { 37 | response.json(note) 38 | } else { 39 | response.status(404).end() 40 | } 41 | }) 42 | 43 | const generateId = () => { 44 | const maxId = 45 | notes.length > 0 ? Math.max(...notes.map((n) => Number(n.id))) : 0 46 | return String(maxId + 1) 47 | } 48 | 49 | app.post('/api/notes', (request, response) => { 50 | const body = request.body 51 | 52 | if (!body.content) { 53 | return response.status(400).json({ 54 | error: 'content missing', 55 | }) 56 | } 57 | 58 | const note = { 59 | content: body.content, 60 | important: body.important || false, 61 | id: generateId(), 62 | } 63 | 64 | notes = notes.concat(note) 65 | 66 | response.json(note) 67 | }) 68 | 69 | app.delete('/api/notes/:id', (request, response) => { 70 | const id = request.params.id 71 | notes = notes.filter((note) => note.id !== id) 72 | 73 | response.status(204).end() 74 | }) 75 | 76 | const PORT = 3001 77 | app.listen(PORT, () => { 78 | console.log(`Server running on port ${PORT}`) 79 | }) 80 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "notebackend", 3 | "version": "0.0.1", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "notebackend", 9 | "version": "0.0.1", 10 | "license": "MIT", 11 | "dependencies": { 12 | "express": "^4.21.2" 13 | } 14 | }, 15 | "node_modules/accepts": { 16 | "version": "1.3.8", 17 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 18 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 19 | "license": "MIT", 20 | "dependencies": { 21 | "mime-types": "~2.1.34", 22 | "negotiator": "0.6.3" 23 | }, 24 | "engines": { 25 | "node": ">= 0.6" 26 | } 27 | }, 28 | "node_modules/array-flatten": { 29 | "version": "1.1.1", 30 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 31 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", 32 | "license": "MIT" 33 | }, 34 | "node_modules/body-parser": { 35 | "version": "1.20.3", 36 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", 37 | "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", 38 | "license": "MIT", 39 | "dependencies": { 40 | "bytes": "3.1.2", 41 | "content-type": "~1.0.5", 42 | "debug": "2.6.9", 43 | "depd": "2.0.0", 44 | "destroy": "1.2.0", 45 | "http-errors": "2.0.0", 46 | "iconv-lite": "0.4.24", 47 | "on-finished": "2.4.1", 48 | "qs": "6.13.0", 49 | "raw-body": "2.5.2", 50 | "type-is": "~1.6.18", 51 | "unpipe": "1.0.0" 52 | }, 53 | "engines": { 54 | "node": ">= 0.8", 55 | "npm": "1.2.8000 || >= 1.4.16" 56 | } 57 | }, 58 | "node_modules/bytes": { 59 | "version": "3.1.2", 60 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 61 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 62 | "license": "MIT", 63 | "engines": { 64 | "node": ">= 0.8" 65 | } 66 | }, 67 | "node_modules/call-bind-apply-helpers": { 68 | "version": "1.0.2", 69 | "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", 70 | "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", 71 | "license": "MIT", 72 | "dependencies": { 73 | "es-errors": "^1.3.0", 74 | "function-bind": "^1.1.2" 75 | }, 76 | "engines": { 77 | "node": ">= 0.4" 78 | } 79 | }, 80 | "node_modules/call-bound": { 81 | "version": "1.0.3", 82 | "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", 83 | "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", 84 | "license": "MIT", 85 | "dependencies": { 86 | "call-bind-apply-helpers": "^1.0.1", 87 | "get-intrinsic": "^1.2.6" 88 | }, 89 | "engines": { 90 | "node": ">= 0.4" 91 | }, 92 | "funding": { 93 | "url": "https://github.com/sponsors/ljharb" 94 | } 95 | }, 96 | "node_modules/content-disposition": { 97 | "version": "0.5.4", 98 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", 99 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 100 | "license": "MIT", 101 | "dependencies": { 102 | "safe-buffer": "5.2.1" 103 | }, 104 | "engines": { 105 | "node": ">= 0.6" 106 | } 107 | }, 108 | "node_modules/content-type": { 109 | "version": "1.0.5", 110 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", 111 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", 112 | "license": "MIT", 113 | "engines": { 114 | "node": ">= 0.6" 115 | } 116 | }, 117 | "node_modules/cookie": { 118 | "version": "0.7.1", 119 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", 120 | "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", 121 | "license": "MIT", 122 | "engines": { 123 | "node": ">= 0.6" 124 | } 125 | }, 126 | "node_modules/cookie-signature": { 127 | "version": "1.0.6", 128 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 129 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", 130 | "license": "MIT" 131 | }, 132 | "node_modules/debug": { 133 | "version": "2.6.9", 134 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 135 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 136 | "license": "MIT", 137 | "dependencies": { 138 | "ms": "2.0.0" 139 | } 140 | }, 141 | "node_modules/depd": { 142 | "version": "2.0.0", 143 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 144 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 145 | "license": "MIT", 146 | "engines": { 147 | "node": ">= 0.8" 148 | } 149 | }, 150 | "node_modules/destroy": { 151 | "version": "1.2.0", 152 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 153 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", 154 | "license": "MIT", 155 | "engines": { 156 | "node": ">= 0.8", 157 | "npm": "1.2.8000 || >= 1.4.16" 158 | } 159 | }, 160 | "node_modules/dunder-proto": { 161 | "version": "1.0.1", 162 | "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", 163 | "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", 164 | "license": "MIT", 165 | "dependencies": { 166 | "call-bind-apply-helpers": "^1.0.1", 167 | "es-errors": "^1.3.0", 168 | "gopd": "^1.2.0" 169 | }, 170 | "engines": { 171 | "node": ">= 0.4" 172 | } 173 | }, 174 | "node_modules/ee-first": { 175 | "version": "1.1.1", 176 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 177 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", 178 | "license": "MIT" 179 | }, 180 | "node_modules/encodeurl": { 181 | "version": "2.0.0", 182 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", 183 | "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", 184 | "license": "MIT", 185 | "engines": { 186 | "node": ">= 0.8" 187 | } 188 | }, 189 | "node_modules/es-define-property": { 190 | "version": "1.0.1", 191 | "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", 192 | "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", 193 | "license": "MIT", 194 | "engines": { 195 | "node": ">= 0.4" 196 | } 197 | }, 198 | "node_modules/es-errors": { 199 | "version": "1.3.0", 200 | "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", 201 | "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", 202 | "license": "MIT", 203 | "engines": { 204 | "node": ">= 0.4" 205 | } 206 | }, 207 | "node_modules/es-object-atoms": { 208 | "version": "1.1.1", 209 | "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", 210 | "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", 211 | "license": "MIT", 212 | "dependencies": { 213 | "es-errors": "^1.3.0" 214 | }, 215 | "engines": { 216 | "node": ">= 0.4" 217 | } 218 | }, 219 | "node_modules/escape-html": { 220 | "version": "1.0.3", 221 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 222 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", 223 | "license": "MIT" 224 | }, 225 | "node_modules/etag": { 226 | "version": "1.8.1", 227 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 228 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", 229 | "license": "MIT", 230 | "engines": { 231 | "node": ">= 0.6" 232 | } 233 | }, 234 | "node_modules/express": { 235 | "version": "4.21.2", 236 | "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", 237 | "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", 238 | "license": "MIT", 239 | "dependencies": { 240 | "accepts": "~1.3.8", 241 | "array-flatten": "1.1.1", 242 | "body-parser": "1.20.3", 243 | "content-disposition": "0.5.4", 244 | "content-type": "~1.0.4", 245 | "cookie": "0.7.1", 246 | "cookie-signature": "1.0.6", 247 | "debug": "2.6.9", 248 | "depd": "2.0.0", 249 | "encodeurl": "~2.0.0", 250 | "escape-html": "~1.0.3", 251 | "etag": "~1.8.1", 252 | "finalhandler": "1.3.1", 253 | "fresh": "0.5.2", 254 | "http-errors": "2.0.0", 255 | "merge-descriptors": "1.0.3", 256 | "methods": "~1.1.2", 257 | "on-finished": "2.4.1", 258 | "parseurl": "~1.3.3", 259 | "path-to-regexp": "0.1.12", 260 | "proxy-addr": "~2.0.7", 261 | "qs": "6.13.0", 262 | "range-parser": "~1.2.1", 263 | "safe-buffer": "5.2.1", 264 | "send": "0.19.0", 265 | "serve-static": "1.16.2", 266 | "setprototypeof": "1.2.0", 267 | "statuses": "2.0.1", 268 | "type-is": "~1.6.18", 269 | "utils-merge": "1.0.1", 270 | "vary": "~1.1.2" 271 | }, 272 | "engines": { 273 | "node": ">= 0.10.0" 274 | }, 275 | "funding": { 276 | "type": "opencollective", 277 | "url": "https://opencollective.com/express" 278 | } 279 | }, 280 | "node_modules/finalhandler": { 281 | "version": "1.3.1", 282 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", 283 | "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", 284 | "license": "MIT", 285 | "dependencies": { 286 | "debug": "2.6.9", 287 | "encodeurl": "~2.0.0", 288 | "escape-html": "~1.0.3", 289 | "on-finished": "2.4.1", 290 | "parseurl": "~1.3.3", 291 | "statuses": "2.0.1", 292 | "unpipe": "~1.0.0" 293 | }, 294 | "engines": { 295 | "node": ">= 0.8" 296 | } 297 | }, 298 | "node_modules/forwarded": { 299 | "version": "0.2.0", 300 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 301 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", 302 | "license": "MIT", 303 | "engines": { 304 | "node": ">= 0.6" 305 | } 306 | }, 307 | "node_modules/fresh": { 308 | "version": "0.5.2", 309 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 310 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", 311 | "license": "MIT", 312 | "engines": { 313 | "node": ">= 0.6" 314 | } 315 | }, 316 | "node_modules/function-bind": { 317 | "version": "1.1.2", 318 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 319 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 320 | "license": "MIT", 321 | "funding": { 322 | "url": "https://github.com/sponsors/ljharb" 323 | } 324 | }, 325 | "node_modules/get-intrinsic": { 326 | "version": "1.2.7", 327 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", 328 | "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", 329 | "license": "MIT", 330 | "dependencies": { 331 | "call-bind-apply-helpers": "^1.0.1", 332 | "es-define-property": "^1.0.1", 333 | "es-errors": "^1.3.0", 334 | "es-object-atoms": "^1.0.0", 335 | "function-bind": "^1.1.2", 336 | "get-proto": "^1.0.0", 337 | "gopd": "^1.2.0", 338 | "has-symbols": "^1.1.0", 339 | "hasown": "^2.0.2", 340 | "math-intrinsics": "^1.1.0" 341 | }, 342 | "engines": { 343 | "node": ">= 0.4" 344 | }, 345 | "funding": { 346 | "url": "https://github.com/sponsors/ljharb" 347 | } 348 | }, 349 | "node_modules/get-proto": { 350 | "version": "1.0.1", 351 | "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", 352 | "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", 353 | "license": "MIT", 354 | "dependencies": { 355 | "dunder-proto": "^1.0.1", 356 | "es-object-atoms": "^1.0.0" 357 | }, 358 | "engines": { 359 | "node": ">= 0.4" 360 | } 361 | }, 362 | "node_modules/gopd": { 363 | "version": "1.2.0", 364 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", 365 | "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", 366 | "license": "MIT", 367 | "engines": { 368 | "node": ">= 0.4" 369 | }, 370 | "funding": { 371 | "url": "https://github.com/sponsors/ljharb" 372 | } 373 | }, 374 | "node_modules/has-symbols": { 375 | "version": "1.1.0", 376 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", 377 | "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", 378 | "license": "MIT", 379 | "engines": { 380 | "node": ">= 0.4" 381 | }, 382 | "funding": { 383 | "url": "https://github.com/sponsors/ljharb" 384 | } 385 | }, 386 | "node_modules/hasown": { 387 | "version": "2.0.2", 388 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", 389 | "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 390 | "license": "MIT", 391 | "dependencies": { 392 | "function-bind": "^1.1.2" 393 | }, 394 | "engines": { 395 | "node": ">= 0.4" 396 | } 397 | }, 398 | "node_modules/http-errors": { 399 | "version": "2.0.0", 400 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 401 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 402 | "license": "MIT", 403 | "dependencies": { 404 | "depd": "2.0.0", 405 | "inherits": "2.0.4", 406 | "setprototypeof": "1.2.0", 407 | "statuses": "2.0.1", 408 | "toidentifier": "1.0.1" 409 | }, 410 | "engines": { 411 | "node": ">= 0.8" 412 | } 413 | }, 414 | "node_modules/iconv-lite": { 415 | "version": "0.4.24", 416 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 417 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 418 | "license": "MIT", 419 | "dependencies": { 420 | "safer-buffer": ">= 2.1.2 < 3" 421 | }, 422 | "engines": { 423 | "node": ">=0.10.0" 424 | } 425 | }, 426 | "node_modules/inherits": { 427 | "version": "2.0.4", 428 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 429 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 430 | "license": "ISC" 431 | }, 432 | "node_modules/ipaddr.js": { 433 | "version": "1.9.1", 434 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 435 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 436 | "license": "MIT", 437 | "engines": { 438 | "node": ">= 0.10" 439 | } 440 | }, 441 | "node_modules/math-intrinsics": { 442 | "version": "1.1.0", 443 | "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", 444 | "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", 445 | "license": "MIT", 446 | "engines": { 447 | "node": ">= 0.4" 448 | } 449 | }, 450 | "node_modules/media-typer": { 451 | "version": "0.3.0", 452 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 453 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", 454 | "license": "MIT", 455 | "engines": { 456 | "node": ">= 0.6" 457 | } 458 | }, 459 | "node_modules/merge-descriptors": { 460 | "version": "1.0.3", 461 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", 462 | "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", 463 | "license": "MIT", 464 | "funding": { 465 | "url": "https://github.com/sponsors/sindresorhus" 466 | } 467 | }, 468 | "node_modules/methods": { 469 | "version": "1.1.2", 470 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 471 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", 472 | "license": "MIT", 473 | "engines": { 474 | "node": ">= 0.6" 475 | } 476 | }, 477 | "node_modules/mime": { 478 | "version": "1.6.0", 479 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 480 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 481 | "license": "MIT", 482 | "bin": { 483 | "mime": "cli.js" 484 | }, 485 | "engines": { 486 | "node": ">=4" 487 | } 488 | }, 489 | "node_modules/mime-db": { 490 | "version": "1.52.0", 491 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 492 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 493 | "license": "MIT", 494 | "engines": { 495 | "node": ">= 0.6" 496 | } 497 | }, 498 | "node_modules/mime-types": { 499 | "version": "2.1.35", 500 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 501 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 502 | "license": "MIT", 503 | "dependencies": { 504 | "mime-db": "1.52.0" 505 | }, 506 | "engines": { 507 | "node": ">= 0.6" 508 | } 509 | }, 510 | "node_modules/ms": { 511 | "version": "2.0.0", 512 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 513 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", 514 | "license": "MIT" 515 | }, 516 | "node_modules/negotiator": { 517 | "version": "0.6.3", 518 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 519 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", 520 | "license": "MIT", 521 | "engines": { 522 | "node": ">= 0.6" 523 | } 524 | }, 525 | "node_modules/object-inspect": { 526 | "version": "1.13.4", 527 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", 528 | "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", 529 | "license": "MIT", 530 | "engines": { 531 | "node": ">= 0.4" 532 | }, 533 | "funding": { 534 | "url": "https://github.com/sponsors/ljharb" 535 | } 536 | }, 537 | "node_modules/on-finished": { 538 | "version": "2.4.1", 539 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 540 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 541 | "license": "MIT", 542 | "dependencies": { 543 | "ee-first": "1.1.1" 544 | }, 545 | "engines": { 546 | "node": ">= 0.8" 547 | } 548 | }, 549 | "node_modules/parseurl": { 550 | "version": "1.3.3", 551 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 552 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 553 | "license": "MIT", 554 | "engines": { 555 | "node": ">= 0.8" 556 | } 557 | }, 558 | "node_modules/path-to-regexp": { 559 | "version": "0.1.12", 560 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", 561 | "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", 562 | "license": "MIT" 563 | }, 564 | "node_modules/proxy-addr": { 565 | "version": "2.0.7", 566 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 567 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 568 | "license": "MIT", 569 | "dependencies": { 570 | "forwarded": "0.2.0", 571 | "ipaddr.js": "1.9.1" 572 | }, 573 | "engines": { 574 | "node": ">= 0.10" 575 | } 576 | }, 577 | "node_modules/qs": { 578 | "version": "6.13.0", 579 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", 580 | "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", 581 | "license": "BSD-3-Clause", 582 | "dependencies": { 583 | "side-channel": "^1.0.6" 584 | }, 585 | "engines": { 586 | "node": ">=0.6" 587 | }, 588 | "funding": { 589 | "url": "https://github.com/sponsors/ljharb" 590 | } 591 | }, 592 | "node_modules/range-parser": { 593 | "version": "1.2.1", 594 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 595 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 596 | "license": "MIT", 597 | "engines": { 598 | "node": ">= 0.6" 599 | } 600 | }, 601 | "node_modules/raw-body": { 602 | "version": "2.5.2", 603 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", 604 | "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", 605 | "license": "MIT", 606 | "dependencies": { 607 | "bytes": "3.1.2", 608 | "http-errors": "2.0.0", 609 | "iconv-lite": "0.4.24", 610 | "unpipe": "1.0.0" 611 | }, 612 | "engines": { 613 | "node": ">= 0.8" 614 | } 615 | }, 616 | "node_modules/safe-buffer": { 617 | "version": "5.2.1", 618 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 619 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 620 | "funding": [ 621 | { 622 | "type": "github", 623 | "url": "https://github.com/sponsors/feross" 624 | }, 625 | { 626 | "type": "patreon", 627 | "url": "https://www.patreon.com/feross" 628 | }, 629 | { 630 | "type": "consulting", 631 | "url": "https://feross.org/support" 632 | } 633 | ], 634 | "license": "MIT" 635 | }, 636 | "node_modules/safer-buffer": { 637 | "version": "2.1.2", 638 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 639 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 640 | "license": "MIT" 641 | }, 642 | "node_modules/send": { 643 | "version": "0.19.0", 644 | "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", 645 | "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", 646 | "license": "MIT", 647 | "dependencies": { 648 | "debug": "2.6.9", 649 | "depd": "2.0.0", 650 | "destroy": "1.2.0", 651 | "encodeurl": "~1.0.2", 652 | "escape-html": "~1.0.3", 653 | "etag": "~1.8.1", 654 | "fresh": "0.5.2", 655 | "http-errors": "2.0.0", 656 | "mime": "1.6.0", 657 | "ms": "2.1.3", 658 | "on-finished": "2.4.1", 659 | "range-parser": "~1.2.1", 660 | "statuses": "2.0.1" 661 | }, 662 | "engines": { 663 | "node": ">= 0.8.0" 664 | } 665 | }, 666 | "node_modules/send/node_modules/encodeurl": { 667 | "version": "1.0.2", 668 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 669 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", 670 | "license": "MIT", 671 | "engines": { 672 | "node": ">= 0.8" 673 | } 674 | }, 675 | "node_modules/send/node_modules/ms": { 676 | "version": "2.1.3", 677 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 678 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 679 | "license": "MIT" 680 | }, 681 | "node_modules/serve-static": { 682 | "version": "1.16.2", 683 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", 684 | "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", 685 | "license": "MIT", 686 | "dependencies": { 687 | "encodeurl": "~2.0.0", 688 | "escape-html": "~1.0.3", 689 | "parseurl": "~1.3.3", 690 | "send": "0.19.0" 691 | }, 692 | "engines": { 693 | "node": ">= 0.8.0" 694 | } 695 | }, 696 | "node_modules/setprototypeof": { 697 | "version": "1.2.0", 698 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 699 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", 700 | "license": "ISC" 701 | }, 702 | "node_modules/side-channel": { 703 | "version": "1.1.0", 704 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", 705 | "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", 706 | "license": "MIT", 707 | "dependencies": { 708 | "es-errors": "^1.3.0", 709 | "object-inspect": "^1.13.3", 710 | "side-channel-list": "^1.0.0", 711 | "side-channel-map": "^1.0.1", 712 | "side-channel-weakmap": "^1.0.2" 713 | }, 714 | "engines": { 715 | "node": ">= 0.4" 716 | }, 717 | "funding": { 718 | "url": "https://github.com/sponsors/ljharb" 719 | } 720 | }, 721 | "node_modules/side-channel-list": { 722 | "version": "1.0.0", 723 | "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", 724 | "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", 725 | "license": "MIT", 726 | "dependencies": { 727 | "es-errors": "^1.3.0", 728 | "object-inspect": "^1.13.3" 729 | }, 730 | "engines": { 731 | "node": ">= 0.4" 732 | }, 733 | "funding": { 734 | "url": "https://github.com/sponsors/ljharb" 735 | } 736 | }, 737 | "node_modules/side-channel-map": { 738 | "version": "1.0.1", 739 | "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", 740 | "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", 741 | "license": "MIT", 742 | "dependencies": { 743 | "call-bound": "^1.0.2", 744 | "es-errors": "^1.3.0", 745 | "get-intrinsic": "^1.2.5", 746 | "object-inspect": "^1.13.3" 747 | }, 748 | "engines": { 749 | "node": ">= 0.4" 750 | }, 751 | "funding": { 752 | "url": "https://github.com/sponsors/ljharb" 753 | } 754 | }, 755 | "node_modules/side-channel-weakmap": { 756 | "version": "1.0.2", 757 | "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", 758 | "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", 759 | "license": "MIT", 760 | "dependencies": { 761 | "call-bound": "^1.0.2", 762 | "es-errors": "^1.3.0", 763 | "get-intrinsic": "^1.2.5", 764 | "object-inspect": "^1.13.3", 765 | "side-channel-map": "^1.0.1" 766 | }, 767 | "engines": { 768 | "node": ">= 0.4" 769 | }, 770 | "funding": { 771 | "url": "https://github.com/sponsors/ljharb" 772 | } 773 | }, 774 | "node_modules/statuses": { 775 | "version": "2.0.1", 776 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 777 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", 778 | "license": "MIT", 779 | "engines": { 780 | "node": ">= 0.8" 781 | } 782 | }, 783 | "node_modules/toidentifier": { 784 | "version": "1.0.1", 785 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 786 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", 787 | "license": "MIT", 788 | "engines": { 789 | "node": ">=0.6" 790 | } 791 | }, 792 | "node_modules/type-is": { 793 | "version": "1.6.18", 794 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 795 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 796 | "license": "MIT", 797 | "dependencies": { 798 | "media-typer": "0.3.0", 799 | "mime-types": "~2.1.24" 800 | }, 801 | "engines": { 802 | "node": ">= 0.6" 803 | } 804 | }, 805 | "node_modules/unpipe": { 806 | "version": "1.0.0", 807 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 808 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", 809 | "license": "MIT", 810 | "engines": { 811 | "node": ">= 0.8" 812 | } 813 | }, 814 | "node_modules/utils-merge": { 815 | "version": "1.0.1", 816 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 817 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", 818 | "license": "MIT", 819 | "engines": { 820 | "node": ">= 0.4.0" 821 | } 822 | }, 823 | "node_modules/vary": { 824 | "version": "1.1.2", 825 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 826 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", 827 | "license": "MIT", 828 | "engines": { 829 | "node": ">= 0.8" 830 | } 831 | } 832 | } 833 | } 834 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "notebackend", 3 | "version": "0.0.1", 4 | "main": "index.js", 5 | "scripts": { 6 | "start": "node index.js", 7 | "dev": "node --watch index.js", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "author": "Matti Luukkainen", 11 | "license": "MIT", 12 | "description": "", 13 | "dependencies": { 14 | "express": "^4.21.2" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /requests/create_note.rest: -------------------------------------------------------------------------------- 1 | POST http://localhost:3001/api/notes 2 | Content-Type: application/json 3 | 4 | { 5 | "content": "VS code rest client is pretty handy tool", 6 | "important": true 7 | } -------------------------------------------------------------------------------- /requests/delete_note.rest: -------------------------------------------------------------------------------- 1 | DELETE http://localhost:3001/api/notes/3 -------------------------------------------------------------------------------- /requests/get_all_notes.rest: -------------------------------------------------------------------------------- 1 | GET http://localhost:3001/api/notes --------------------------------------------------------------------------------