├── README.md
├── client
├── .gitignore
├── README.md
├── package-lock.json
├── package.json
├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
└── src
│ ├── App.css
│ ├── App.js
│ ├── components
│ ├── Layout.jsx
│ ├── TodoForm.jsx
│ └── TodoList.jsx
│ └── index.js
└── server
├── .env
├── .gitignore
├── Procfile
├── index.js
├── package-lock.json
├── package.json
├── records
└── todo.record.js
├── routers
└── todos.js
└── utils
└── db.js
/README.md:
--------------------------------------------------------------------------------
1 | # Todo App (Express + React + MySQL)
2 | > A Full Stack (Node/Express + React) CRUD Todo App, connected with a MySQL database.
3 | >
4 | > Live demo [_here_](https://helpful-dragon-d4e50a.netlify.app/).
5 |
6 | ## Table of contents
7 |
8 | * [General info](#general-info)
9 | * [Technologies](#technologies)
10 |
11 | ## General info
12 |
13 | A full stack application (Node/Express + React) CRUD Todo App, connected mith a MySQL database.
14 | The backend API of this application is hosted on Heroku, and the frontend is deployed on Netlify.
15 |
16 | Thanks to the app, you can manage your daily tasks.
17 |
18 | You can:
19 |
20 | - add tasks,
21 | - edit tasks,
22 | - delete tasks
23 |
24 | ## Technologies
25 |
26 | Project is created with:
27 |
28 | Backend:
29 |
30 | - Node
31 | - Express
32 | - MySQL
33 |
34 | Frontend:
35 |
36 | - React
37 | - Bootstrap 5
38 |
--------------------------------------------------------------------------------
/client/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/client/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Create React App
2 |
3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4 |
5 | ## Available Scripts
6 |
7 | In the project directory, you can run:
8 |
9 | ### `npm start`
10 |
11 | Runs the app in the development mode.\
12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
13 |
14 | The page will reload when you make changes.\
15 | You may also see any lint errors in the console.
16 |
17 | ### `npm test`
18 |
19 | Launches the test runner in the interactive watch mode.\
20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21 |
22 | ### `npm run build`
23 |
24 | Builds the app for production to the `build` folder.\
25 | It correctly bundles React in production mode and optimizes the build for the best performance.
26 |
27 | The build is minified and the filenames include the hashes.\
28 | Your app is ready to be deployed!
29 |
30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31 |
32 | ### `npm run eject`
33 |
34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!**
35 |
36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37 |
38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
39 |
40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
41 |
42 | ## Learn More
43 |
44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45 |
46 | To learn React, check out the [React documentation](https://reactjs.org/).
47 |
48 | ### Code Splitting
49 |
50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51 |
52 | ### Analyzing the Bundle Size
53 |
54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55 |
56 | ### Making a Progressive Web App
57 |
58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59 |
60 | ### Advanced Configuration
61 |
62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63 |
64 | ### Deployment
65 |
66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67 |
68 | ### `npm run build` fails to minify
69 |
70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
71 |
--------------------------------------------------------------------------------
/client/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "client",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.16.4",
7 | "@testing-library/react": "^13.3.0",
8 | "@testing-library/user-event": "^13.5.0",
9 | "axios": "^0.27.2",
10 | "bootstrap": "^5.1.3",
11 | "react": "^18.1.0",
12 | "react-bootstrap": "^2.4.0",
13 | "react-dom": "^18.1.0",
14 | "react-scripts": "5.0.1",
15 | "web-vitals": "^2.1.4"
16 | },
17 | "scripts": {
18 | "start": "react-scripts start",
19 | "build": "react-scripts build",
20 | "test": "react-scripts test",
21 | "eject": "react-scripts eject"
22 | },
23 | "eslintConfig": {
24 | "extends": [
25 | "react-app",
26 | "react-app/jest"
27 | ]
28 | },
29 | "browserslist": {
30 | "production": [
31 | ">0.2%",
32 | "not dead",
33 | "not op_mini all"
34 | ],
35 | "development": [
36 | "last 1 chrome version",
37 | "last 1 firefox version",
38 | "last 1 safari version"
39 | ]
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/client/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mderus/todolist-react-node-mysql/86628d84abf93ac9289c0c765796ae1c4621fa99/client/public/favicon.ico
--------------------------------------------------------------------------------
/client/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
27 | React App
28 |
29 |
30 | You need to enable JavaScript to run this app.
31 |
32 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/client/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mderus/todolist-react-node-mysql/86628d84abf93ac9289c0c765796ae1c4621fa99/client/public/logo192.png
--------------------------------------------------------------------------------
/client/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mderus/todolist-react-node-mysql/86628d84abf93ac9289c0c765796ae1c4621fa99/client/public/logo512.png
--------------------------------------------------------------------------------
/client/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/client/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/client/src/App.css:
--------------------------------------------------------------------------------
1 | /* * {
2 | box-sizing: border-box;
3 | padding: 0;
4 | margin: 0;
5 | font-family: 'Arial';
6 | }
7 |
8 | .App {
9 | display: flex;
10 | justify-content: center;
11 | align-items: center;
12 | margin-top: 20px;
13 | }
14 |
15 | input {
16 | width: 300px;
17 | height: 30px;
18 | }
19 |
20 | button {
21 | margin-left: 10px;
22 | width: 80px;
23 | height: 30px;
24 | } */
25 |
--------------------------------------------------------------------------------
/client/src/App.js:
--------------------------------------------------------------------------------
1 | import {useState, useEffect} from 'react';
2 | import axios from 'axios';
3 | import 'bootstrap/dist/css/bootstrap.min.css';
4 | import Layout from './components/Layout';
5 | import TodoForm from './components/TodoForm';
6 | import TodoList from './components/TodoList';
7 |
8 | function App() {
9 | const [todo, setTodo] = useState('');
10 | const [todoList, setTodoList] = useState([]);
11 | const [newTodo, setNewTodo] = useState('');
12 |
13 | const handleCharactersError = (value) => {
14 | if (value.length < 3 || value.length > 50) {
15 | throw new Error(
16 | alert(
17 | 'Todo must have at least 3 characters and less than 50 characters.'
18 | )
19 | );
20 | }
21 | };
22 |
23 | const addTodo = async () => {
24 | handleCharactersError(todo);
25 |
26 | try {
27 | await axios.post('https://todo-mysql-backend.herokuapp.com/create', {
28 | todo,
29 | });
30 | } catch (err) {
31 | console.error(err.message);
32 | }
33 | };
34 |
35 | const getAllTodos = async () => {
36 | try {
37 | await axios
38 | .get('https://todo-mysql-backend.herokuapp.com/')
39 | .then((response) => {
40 | setTodoList(response.data);
41 | });
42 | } catch (err) {
43 | console.error(err.message);
44 | }
45 | };
46 |
47 | const updateTodo = async (id) => {
48 | handleCharactersError(newTodo);
49 |
50 | try {
51 | await axios
52 | .put(`https://todo-mysql-backend.herokuapp.com/update/${id}`, {
53 | id,
54 | todo: newTodo,
55 | })
56 | .then((response) => {
57 | console.log(response.data);
58 | setTodoList(
59 | todoList.map((val) =>
60 | val.id === id ? {id: val.id, todo: val.todo} : val
61 | )
62 | );
63 | });
64 | } catch (err) {
65 | console.error(err.message);
66 | }
67 | };
68 |
69 | const deleteTodo = async (id) => {
70 | try {
71 | await axios
72 | .delete(`https://todo-mysql-backend.herokuapp.com/${id}`)
73 | .then((response) => {
74 | setTodoList(todoList.filter((val) => val.id !== id));
75 | });
76 | } catch (err) {
77 | console.error(err.message);
78 | }
79 | };
80 |
81 | const handleSubmit = (event) => {
82 | event.preventDefault();
83 | addTodo();
84 | setTodo('');
85 | };
86 |
87 | useEffect(() => {
88 | getAllTodos();
89 | }, [todoList]);
90 |
91 | return (
92 |
93 |
94 |
95 |
101 |
102 |
103 | );
104 | }
105 |
106 | export default App;
107 |
--------------------------------------------------------------------------------
/client/src/components/Layout.jsx:
--------------------------------------------------------------------------------
1 | import Container from 'react-bootstrap/Container';
2 | import Col from 'react-bootstrap/Col';
3 | import Row from 'react-bootstrap/Row';
4 |
5 | const Layout = (props) => {
6 | return (
7 |
8 |
9 |
10 | Todo App
11 | {props.children}
12 |
13 |
14 |
15 | );
16 | };
17 |
18 | export default Layout;
19 |
--------------------------------------------------------------------------------
/client/src/components/TodoForm.jsx:
--------------------------------------------------------------------------------
1 | import Form from 'react-bootstrap/Form';
2 | import InputGroup from 'react-bootstrap/InputGroup';
3 | import FormControl from 'react-bootstrap/FormControl';
4 | import Button from 'react-bootstrap/Button';
5 |
6 | const TodoForm = (props) => {
7 | const {handleSubmit, setTodo, todo} = props;
8 | return (
9 |
29 | );
30 | };
31 |
32 | export default TodoForm;
33 |
--------------------------------------------------------------------------------
/client/src/components/TodoList.jsx:
--------------------------------------------------------------------------------
1 | import ListGroup from 'react-bootstrap/ListGroup';
2 | import Form from 'react-bootstrap/Form';
3 | import InputGroup from 'react-bootstrap/InputGroup';
4 | import FormControl from 'react-bootstrap/FormControl';
5 | import Button from 'react-bootstrap/Button';
6 |
7 | const TodoList = (props) => {
8 | const {todoList, setNewTodo, updateTodo, deleteTodo} = props;
9 |
10 | return (
11 |
12 |
13 | You have {todoList.length} {todoList.length === 1 ? 'todo' : 'todos'}
14 |
15 | {todoList.map((val) => {
16 | return (
17 |
22 | {val.todo}
23 |
24 |
45 | deleteTodo(val.id)}
49 | >
50 | Delete
51 |
52 |
53 |
54 | );
55 | })}
56 |
57 | );
58 | };
59 |
60 | export default TodoList;
61 |
--------------------------------------------------------------------------------
/client/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom/client';
3 | import App from './App';
4 |
5 | const root = ReactDOM.createRoot(document.getElementById('root'));
6 | root.render(
7 |
8 |
9 |
10 | );
11 |
--------------------------------------------------------------------------------
/server/.env:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mderus/todolist-react-node-mysql/86628d84abf93ac9289c0c765796ae1c4621fa99/server/.env
--------------------------------------------------------------------------------
/server/.gitignore:
--------------------------------------------------------------------------------
1 | # dependencies
2 | /node_modules
--------------------------------------------------------------------------------
/server/Procfile:
--------------------------------------------------------------------------------
1 | web:node index.js
--------------------------------------------------------------------------------
/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const cors = require('cors');
3 | const {TodoRouter} = require('./routers/todos');
4 | require('./utils/db');
5 |
6 | const app = express();
7 |
8 | app.use(cors());
9 | app.use(express.json());
10 |
11 | app.use('/', TodoRouter);
12 |
13 | const PORT = process.env.PORT || 8080;
14 |
15 | app.listen(PORT, () => {
16 | console.log(`Listening on port ${PORT}`);
17 | });
18 |
--------------------------------------------------------------------------------
/server/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "lockfileVersion": 2,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "server",
9 | "version": "1.0.0",
10 | "license": "ISC",
11 | "dependencies": {
12 | "cors": "^2.8.5",
13 | "express": "^4.18.1",
14 | "mysql2": "^2.3.3",
15 | "uuid": "^8.3.2"
16 | }
17 | },
18 | "node_modules/accepts": {
19 | "version": "1.3.8",
20 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
21 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
22 | "dependencies": {
23 | "mime-types": "~2.1.34",
24 | "negotiator": "0.6.3"
25 | },
26 | "engines": {
27 | "node": ">= 0.6"
28 | }
29 | },
30 | "node_modules/array-flatten": {
31 | "version": "1.1.1",
32 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
33 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
34 | },
35 | "node_modules/body-parser": {
36 | "version": "1.20.0",
37 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz",
38 | "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==",
39 | "dependencies": {
40 | "bytes": "3.1.2",
41 | "content-type": "~1.0.4",
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.10.3",
49 | "raw-body": "2.5.1",
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 | "engines": {
63 | "node": ">= 0.8"
64 | }
65 | },
66 | "node_modules/call-bind": {
67 | "version": "1.0.2",
68 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
69 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
70 | "dependencies": {
71 | "function-bind": "^1.1.1",
72 | "get-intrinsic": "^1.0.2"
73 | },
74 | "funding": {
75 | "url": "https://github.com/sponsors/ljharb"
76 | }
77 | },
78 | "node_modules/content-disposition": {
79 | "version": "0.5.4",
80 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
81 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
82 | "dependencies": {
83 | "safe-buffer": "5.2.1"
84 | },
85 | "engines": {
86 | "node": ">= 0.6"
87 | }
88 | },
89 | "node_modules/content-type": {
90 | "version": "1.0.4",
91 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
92 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
93 | "engines": {
94 | "node": ">= 0.6"
95 | }
96 | },
97 | "node_modules/cookie": {
98 | "version": "0.5.0",
99 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
100 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
101 | "engines": {
102 | "node": ">= 0.6"
103 | }
104 | },
105 | "node_modules/cookie-signature": {
106 | "version": "1.0.6",
107 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
108 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
109 | },
110 | "node_modules/cors": {
111 | "version": "2.8.5",
112 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
113 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
114 | "dependencies": {
115 | "object-assign": "^4",
116 | "vary": "^1"
117 | },
118 | "engines": {
119 | "node": ">= 0.10"
120 | }
121 | },
122 | "node_modules/debug": {
123 | "version": "2.6.9",
124 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
125 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
126 | "dependencies": {
127 | "ms": "2.0.0"
128 | }
129 | },
130 | "node_modules/denque": {
131 | "version": "2.0.1",
132 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
133 | "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==",
134 | "engines": {
135 | "node": ">=0.10"
136 | }
137 | },
138 | "node_modules/depd": {
139 | "version": "2.0.0",
140 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
141 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
142 | "engines": {
143 | "node": ">= 0.8"
144 | }
145 | },
146 | "node_modules/destroy": {
147 | "version": "1.2.0",
148 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
149 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
150 | "engines": {
151 | "node": ">= 0.8",
152 | "npm": "1.2.8000 || >= 1.4.16"
153 | }
154 | },
155 | "node_modules/ee-first": {
156 | "version": "1.1.1",
157 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
158 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
159 | },
160 | "node_modules/encodeurl": {
161 | "version": "1.0.2",
162 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
163 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
164 | "engines": {
165 | "node": ">= 0.8"
166 | }
167 | },
168 | "node_modules/escape-html": {
169 | "version": "1.0.3",
170 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
171 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
172 | },
173 | "node_modules/etag": {
174 | "version": "1.8.1",
175 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
176 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
177 | "engines": {
178 | "node": ">= 0.6"
179 | }
180 | },
181 | "node_modules/express": {
182 | "version": "4.18.1",
183 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz",
184 | "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==",
185 | "dependencies": {
186 | "accepts": "~1.3.8",
187 | "array-flatten": "1.1.1",
188 | "body-parser": "1.20.0",
189 | "content-disposition": "0.5.4",
190 | "content-type": "~1.0.4",
191 | "cookie": "0.5.0",
192 | "cookie-signature": "1.0.6",
193 | "debug": "2.6.9",
194 | "depd": "2.0.0",
195 | "encodeurl": "~1.0.2",
196 | "escape-html": "~1.0.3",
197 | "etag": "~1.8.1",
198 | "finalhandler": "1.2.0",
199 | "fresh": "0.5.2",
200 | "http-errors": "2.0.0",
201 | "merge-descriptors": "1.0.1",
202 | "methods": "~1.1.2",
203 | "on-finished": "2.4.1",
204 | "parseurl": "~1.3.3",
205 | "path-to-regexp": "0.1.7",
206 | "proxy-addr": "~2.0.7",
207 | "qs": "6.10.3",
208 | "range-parser": "~1.2.1",
209 | "safe-buffer": "5.2.1",
210 | "send": "0.18.0",
211 | "serve-static": "1.15.0",
212 | "setprototypeof": "1.2.0",
213 | "statuses": "2.0.1",
214 | "type-is": "~1.6.18",
215 | "utils-merge": "1.0.1",
216 | "vary": "~1.1.2"
217 | },
218 | "engines": {
219 | "node": ">= 0.10.0"
220 | }
221 | },
222 | "node_modules/finalhandler": {
223 | "version": "1.2.0",
224 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
225 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
226 | "dependencies": {
227 | "debug": "2.6.9",
228 | "encodeurl": "~1.0.2",
229 | "escape-html": "~1.0.3",
230 | "on-finished": "2.4.1",
231 | "parseurl": "~1.3.3",
232 | "statuses": "2.0.1",
233 | "unpipe": "~1.0.0"
234 | },
235 | "engines": {
236 | "node": ">= 0.8"
237 | }
238 | },
239 | "node_modules/forwarded": {
240 | "version": "0.2.0",
241 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
242 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
243 | "engines": {
244 | "node": ">= 0.6"
245 | }
246 | },
247 | "node_modules/fresh": {
248 | "version": "0.5.2",
249 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
250 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
251 | "engines": {
252 | "node": ">= 0.6"
253 | }
254 | },
255 | "node_modules/function-bind": {
256 | "version": "1.1.1",
257 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
258 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
259 | },
260 | "node_modules/generate-function": {
261 | "version": "2.3.1",
262 | "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
263 | "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
264 | "dependencies": {
265 | "is-property": "^1.0.2"
266 | }
267 | },
268 | "node_modules/get-intrinsic": {
269 | "version": "1.1.2",
270 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz",
271 | "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==",
272 | "dependencies": {
273 | "function-bind": "^1.1.1",
274 | "has": "^1.0.3",
275 | "has-symbols": "^1.0.3"
276 | },
277 | "funding": {
278 | "url": "https://github.com/sponsors/ljharb"
279 | }
280 | },
281 | "node_modules/has": {
282 | "version": "1.0.3",
283 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
284 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
285 | "dependencies": {
286 | "function-bind": "^1.1.1"
287 | },
288 | "engines": {
289 | "node": ">= 0.4.0"
290 | }
291 | },
292 | "node_modules/has-symbols": {
293 | "version": "1.0.3",
294 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
295 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
296 | "engines": {
297 | "node": ">= 0.4"
298 | },
299 | "funding": {
300 | "url": "https://github.com/sponsors/ljharb"
301 | }
302 | },
303 | "node_modules/http-errors": {
304 | "version": "2.0.0",
305 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
306 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
307 | "dependencies": {
308 | "depd": "2.0.0",
309 | "inherits": "2.0.4",
310 | "setprototypeof": "1.2.0",
311 | "statuses": "2.0.1",
312 | "toidentifier": "1.0.1"
313 | },
314 | "engines": {
315 | "node": ">= 0.8"
316 | }
317 | },
318 | "node_modules/iconv-lite": {
319 | "version": "0.4.24",
320 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
321 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
322 | "dependencies": {
323 | "safer-buffer": ">= 2.1.2 < 3"
324 | },
325 | "engines": {
326 | "node": ">=0.10.0"
327 | }
328 | },
329 | "node_modules/inherits": {
330 | "version": "2.0.4",
331 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
332 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
333 | },
334 | "node_modules/ipaddr.js": {
335 | "version": "1.9.1",
336 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
337 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
338 | "engines": {
339 | "node": ">= 0.10"
340 | }
341 | },
342 | "node_modules/is-property": {
343 | "version": "1.0.2",
344 | "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
345 | "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="
346 | },
347 | "node_modules/long": {
348 | "version": "4.0.0",
349 | "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
350 | "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
351 | },
352 | "node_modules/lru-cache": {
353 | "version": "6.0.0",
354 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
355 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
356 | "dependencies": {
357 | "yallist": "^4.0.0"
358 | },
359 | "engines": {
360 | "node": ">=10"
361 | }
362 | },
363 | "node_modules/media-typer": {
364 | "version": "0.3.0",
365 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
366 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
367 | "engines": {
368 | "node": ">= 0.6"
369 | }
370 | },
371 | "node_modules/merge-descriptors": {
372 | "version": "1.0.1",
373 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
374 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
375 | },
376 | "node_modules/methods": {
377 | "version": "1.1.2",
378 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
379 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
380 | "engines": {
381 | "node": ">= 0.6"
382 | }
383 | },
384 | "node_modules/mime": {
385 | "version": "1.6.0",
386 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
387 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
388 | "bin": {
389 | "mime": "cli.js"
390 | },
391 | "engines": {
392 | "node": ">=4"
393 | }
394 | },
395 | "node_modules/mime-db": {
396 | "version": "1.52.0",
397 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
398 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
399 | "engines": {
400 | "node": ">= 0.6"
401 | }
402 | },
403 | "node_modules/mime-types": {
404 | "version": "2.1.35",
405 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
406 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
407 | "dependencies": {
408 | "mime-db": "1.52.0"
409 | },
410 | "engines": {
411 | "node": ">= 0.6"
412 | }
413 | },
414 | "node_modules/ms": {
415 | "version": "2.0.0",
416 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
417 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
418 | },
419 | "node_modules/mysql2": {
420 | "version": "2.3.3",
421 | "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.3.3.tgz",
422 | "integrity": "sha512-wxJUev6LgMSgACDkb/InIFxDprRa6T95+VEoR+xPvtngtccNH2dGjEB/fVZ8yg1gWv1510c9CvXuJHi5zUm0ZA==",
423 | "dependencies": {
424 | "denque": "^2.0.1",
425 | "generate-function": "^2.3.1",
426 | "iconv-lite": "^0.6.3",
427 | "long": "^4.0.0",
428 | "lru-cache": "^6.0.0",
429 | "named-placeholders": "^1.1.2",
430 | "seq-queue": "^0.0.5",
431 | "sqlstring": "^2.3.2"
432 | },
433 | "engines": {
434 | "node": ">= 8.0"
435 | }
436 | },
437 | "node_modules/mysql2/node_modules/iconv-lite": {
438 | "version": "0.6.3",
439 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
440 | "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
441 | "dependencies": {
442 | "safer-buffer": ">= 2.1.2 < 3.0.0"
443 | },
444 | "engines": {
445 | "node": ">=0.10.0"
446 | }
447 | },
448 | "node_modules/named-placeholders": {
449 | "version": "1.1.2",
450 | "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.2.tgz",
451 | "integrity": "sha512-wiFWqxoLL3PGVReSZpjLVxyJ1bRqe+KKJVbr4hGs1KWfTZTQyezHFBbuKj9hsizHyGV2ne7EMjHdxEGAybD5SA==",
452 | "dependencies": {
453 | "lru-cache": "^4.1.3"
454 | },
455 | "engines": {
456 | "node": ">=6.0.0"
457 | }
458 | },
459 | "node_modules/named-placeholders/node_modules/lru-cache": {
460 | "version": "4.1.5",
461 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
462 | "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
463 | "dependencies": {
464 | "pseudomap": "^1.0.2",
465 | "yallist": "^2.1.2"
466 | }
467 | },
468 | "node_modules/named-placeholders/node_modules/yallist": {
469 | "version": "2.1.2",
470 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
471 | "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A=="
472 | },
473 | "node_modules/negotiator": {
474 | "version": "0.6.3",
475 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
476 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
477 | "engines": {
478 | "node": ">= 0.6"
479 | }
480 | },
481 | "node_modules/object-assign": {
482 | "version": "4.1.1",
483 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
484 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
485 | "engines": {
486 | "node": ">=0.10.0"
487 | }
488 | },
489 | "node_modules/object-inspect": {
490 | "version": "1.12.2",
491 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
492 | "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==",
493 | "funding": {
494 | "url": "https://github.com/sponsors/ljharb"
495 | }
496 | },
497 | "node_modules/on-finished": {
498 | "version": "2.4.1",
499 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
500 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
501 | "dependencies": {
502 | "ee-first": "1.1.1"
503 | },
504 | "engines": {
505 | "node": ">= 0.8"
506 | }
507 | },
508 | "node_modules/parseurl": {
509 | "version": "1.3.3",
510 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
511 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
512 | "engines": {
513 | "node": ">= 0.8"
514 | }
515 | },
516 | "node_modules/path-to-regexp": {
517 | "version": "0.1.7",
518 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
519 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
520 | },
521 | "node_modules/proxy-addr": {
522 | "version": "2.0.7",
523 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
524 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
525 | "dependencies": {
526 | "forwarded": "0.2.0",
527 | "ipaddr.js": "1.9.1"
528 | },
529 | "engines": {
530 | "node": ">= 0.10"
531 | }
532 | },
533 | "node_modules/pseudomap": {
534 | "version": "1.0.2",
535 | "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
536 | "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ=="
537 | },
538 | "node_modules/qs": {
539 | "version": "6.10.3",
540 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz",
541 | "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
542 | "dependencies": {
543 | "side-channel": "^1.0.4"
544 | },
545 | "engines": {
546 | "node": ">=0.6"
547 | },
548 | "funding": {
549 | "url": "https://github.com/sponsors/ljharb"
550 | }
551 | },
552 | "node_modules/range-parser": {
553 | "version": "1.2.1",
554 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
555 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
556 | "engines": {
557 | "node": ">= 0.6"
558 | }
559 | },
560 | "node_modules/raw-body": {
561 | "version": "2.5.1",
562 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
563 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
564 | "dependencies": {
565 | "bytes": "3.1.2",
566 | "http-errors": "2.0.0",
567 | "iconv-lite": "0.4.24",
568 | "unpipe": "1.0.0"
569 | },
570 | "engines": {
571 | "node": ">= 0.8"
572 | }
573 | },
574 | "node_modules/safe-buffer": {
575 | "version": "5.2.1",
576 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
577 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
578 | "funding": [
579 | {
580 | "type": "github",
581 | "url": "https://github.com/sponsors/feross"
582 | },
583 | {
584 | "type": "patreon",
585 | "url": "https://www.patreon.com/feross"
586 | },
587 | {
588 | "type": "consulting",
589 | "url": "https://feross.org/support"
590 | }
591 | ]
592 | },
593 | "node_modules/safer-buffer": {
594 | "version": "2.1.2",
595 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
596 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
597 | },
598 | "node_modules/send": {
599 | "version": "0.18.0",
600 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
601 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
602 | "dependencies": {
603 | "debug": "2.6.9",
604 | "depd": "2.0.0",
605 | "destroy": "1.2.0",
606 | "encodeurl": "~1.0.2",
607 | "escape-html": "~1.0.3",
608 | "etag": "~1.8.1",
609 | "fresh": "0.5.2",
610 | "http-errors": "2.0.0",
611 | "mime": "1.6.0",
612 | "ms": "2.1.3",
613 | "on-finished": "2.4.1",
614 | "range-parser": "~1.2.1",
615 | "statuses": "2.0.1"
616 | },
617 | "engines": {
618 | "node": ">= 0.8.0"
619 | }
620 | },
621 | "node_modules/send/node_modules/ms": {
622 | "version": "2.1.3",
623 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
624 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
625 | },
626 | "node_modules/seq-queue": {
627 | "version": "0.0.5",
628 | "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz",
629 | "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q=="
630 | },
631 | "node_modules/serve-static": {
632 | "version": "1.15.0",
633 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
634 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
635 | "dependencies": {
636 | "encodeurl": "~1.0.2",
637 | "escape-html": "~1.0.3",
638 | "parseurl": "~1.3.3",
639 | "send": "0.18.0"
640 | },
641 | "engines": {
642 | "node": ">= 0.8.0"
643 | }
644 | },
645 | "node_modules/setprototypeof": {
646 | "version": "1.2.0",
647 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
648 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
649 | },
650 | "node_modules/side-channel": {
651 | "version": "1.0.4",
652 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
653 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
654 | "dependencies": {
655 | "call-bind": "^1.0.0",
656 | "get-intrinsic": "^1.0.2",
657 | "object-inspect": "^1.9.0"
658 | },
659 | "funding": {
660 | "url": "https://github.com/sponsors/ljharb"
661 | }
662 | },
663 | "node_modules/sqlstring": {
664 | "version": "2.3.3",
665 | "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz",
666 | "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==",
667 | "engines": {
668 | "node": ">= 0.6"
669 | }
670 | },
671 | "node_modules/statuses": {
672 | "version": "2.0.1",
673 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
674 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
675 | "engines": {
676 | "node": ">= 0.8"
677 | }
678 | },
679 | "node_modules/toidentifier": {
680 | "version": "1.0.1",
681 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
682 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
683 | "engines": {
684 | "node": ">=0.6"
685 | }
686 | },
687 | "node_modules/type-is": {
688 | "version": "1.6.18",
689 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
690 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
691 | "dependencies": {
692 | "media-typer": "0.3.0",
693 | "mime-types": "~2.1.24"
694 | },
695 | "engines": {
696 | "node": ">= 0.6"
697 | }
698 | },
699 | "node_modules/unpipe": {
700 | "version": "1.0.0",
701 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
702 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
703 | "engines": {
704 | "node": ">= 0.8"
705 | }
706 | },
707 | "node_modules/utils-merge": {
708 | "version": "1.0.1",
709 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
710 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
711 | "engines": {
712 | "node": ">= 0.4.0"
713 | }
714 | },
715 | "node_modules/uuid": {
716 | "version": "8.3.2",
717 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
718 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
719 | "bin": {
720 | "uuid": "dist/bin/uuid"
721 | }
722 | },
723 | "node_modules/vary": {
724 | "version": "1.1.2",
725 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
726 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
727 | "engines": {
728 | "node": ">= 0.8"
729 | }
730 | },
731 | "node_modules/yallist": {
732 | "version": "4.0.0",
733 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
734 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
735 | }
736 | },
737 | "dependencies": {
738 | "accepts": {
739 | "version": "1.3.8",
740 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
741 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
742 | "requires": {
743 | "mime-types": "~2.1.34",
744 | "negotiator": "0.6.3"
745 | }
746 | },
747 | "array-flatten": {
748 | "version": "1.1.1",
749 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
750 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
751 | },
752 | "body-parser": {
753 | "version": "1.20.0",
754 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz",
755 | "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==",
756 | "requires": {
757 | "bytes": "3.1.2",
758 | "content-type": "~1.0.4",
759 | "debug": "2.6.9",
760 | "depd": "2.0.0",
761 | "destroy": "1.2.0",
762 | "http-errors": "2.0.0",
763 | "iconv-lite": "0.4.24",
764 | "on-finished": "2.4.1",
765 | "qs": "6.10.3",
766 | "raw-body": "2.5.1",
767 | "type-is": "~1.6.18",
768 | "unpipe": "1.0.0"
769 | }
770 | },
771 | "bytes": {
772 | "version": "3.1.2",
773 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
774 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="
775 | },
776 | "call-bind": {
777 | "version": "1.0.2",
778 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
779 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
780 | "requires": {
781 | "function-bind": "^1.1.1",
782 | "get-intrinsic": "^1.0.2"
783 | }
784 | },
785 | "content-disposition": {
786 | "version": "0.5.4",
787 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
788 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
789 | "requires": {
790 | "safe-buffer": "5.2.1"
791 | }
792 | },
793 | "content-type": {
794 | "version": "1.0.4",
795 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
796 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
797 | },
798 | "cookie": {
799 | "version": "0.5.0",
800 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
801 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw=="
802 | },
803 | "cookie-signature": {
804 | "version": "1.0.6",
805 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
806 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
807 | },
808 | "cors": {
809 | "version": "2.8.5",
810 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
811 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
812 | "requires": {
813 | "object-assign": "^4",
814 | "vary": "^1"
815 | }
816 | },
817 | "debug": {
818 | "version": "2.6.9",
819 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
820 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
821 | "requires": {
822 | "ms": "2.0.0"
823 | }
824 | },
825 | "denque": {
826 | "version": "2.0.1",
827 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
828 | "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ=="
829 | },
830 | "depd": {
831 | "version": "2.0.0",
832 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
833 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="
834 | },
835 | "destroy": {
836 | "version": "1.2.0",
837 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
838 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="
839 | },
840 | "ee-first": {
841 | "version": "1.1.1",
842 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
843 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
844 | },
845 | "encodeurl": {
846 | "version": "1.0.2",
847 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
848 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="
849 | },
850 | "escape-html": {
851 | "version": "1.0.3",
852 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
853 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
854 | },
855 | "etag": {
856 | "version": "1.8.1",
857 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
858 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="
859 | },
860 | "express": {
861 | "version": "4.18.1",
862 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz",
863 | "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==",
864 | "requires": {
865 | "accepts": "~1.3.8",
866 | "array-flatten": "1.1.1",
867 | "body-parser": "1.20.0",
868 | "content-disposition": "0.5.4",
869 | "content-type": "~1.0.4",
870 | "cookie": "0.5.0",
871 | "cookie-signature": "1.0.6",
872 | "debug": "2.6.9",
873 | "depd": "2.0.0",
874 | "encodeurl": "~1.0.2",
875 | "escape-html": "~1.0.3",
876 | "etag": "~1.8.1",
877 | "finalhandler": "1.2.0",
878 | "fresh": "0.5.2",
879 | "http-errors": "2.0.0",
880 | "merge-descriptors": "1.0.1",
881 | "methods": "~1.1.2",
882 | "on-finished": "2.4.1",
883 | "parseurl": "~1.3.3",
884 | "path-to-regexp": "0.1.7",
885 | "proxy-addr": "~2.0.7",
886 | "qs": "6.10.3",
887 | "range-parser": "~1.2.1",
888 | "safe-buffer": "5.2.1",
889 | "send": "0.18.0",
890 | "serve-static": "1.15.0",
891 | "setprototypeof": "1.2.0",
892 | "statuses": "2.0.1",
893 | "type-is": "~1.6.18",
894 | "utils-merge": "1.0.1",
895 | "vary": "~1.1.2"
896 | }
897 | },
898 | "finalhandler": {
899 | "version": "1.2.0",
900 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
901 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
902 | "requires": {
903 | "debug": "2.6.9",
904 | "encodeurl": "~1.0.2",
905 | "escape-html": "~1.0.3",
906 | "on-finished": "2.4.1",
907 | "parseurl": "~1.3.3",
908 | "statuses": "2.0.1",
909 | "unpipe": "~1.0.0"
910 | }
911 | },
912 | "forwarded": {
913 | "version": "0.2.0",
914 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
915 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="
916 | },
917 | "fresh": {
918 | "version": "0.5.2",
919 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
920 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="
921 | },
922 | "function-bind": {
923 | "version": "1.1.1",
924 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
925 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
926 | },
927 | "generate-function": {
928 | "version": "2.3.1",
929 | "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
930 | "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
931 | "requires": {
932 | "is-property": "^1.0.2"
933 | }
934 | },
935 | "get-intrinsic": {
936 | "version": "1.1.2",
937 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz",
938 | "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==",
939 | "requires": {
940 | "function-bind": "^1.1.1",
941 | "has": "^1.0.3",
942 | "has-symbols": "^1.0.3"
943 | }
944 | },
945 | "has": {
946 | "version": "1.0.3",
947 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
948 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
949 | "requires": {
950 | "function-bind": "^1.1.1"
951 | }
952 | },
953 | "has-symbols": {
954 | "version": "1.0.3",
955 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
956 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
957 | },
958 | "http-errors": {
959 | "version": "2.0.0",
960 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
961 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
962 | "requires": {
963 | "depd": "2.0.0",
964 | "inherits": "2.0.4",
965 | "setprototypeof": "1.2.0",
966 | "statuses": "2.0.1",
967 | "toidentifier": "1.0.1"
968 | }
969 | },
970 | "iconv-lite": {
971 | "version": "0.4.24",
972 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
973 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
974 | "requires": {
975 | "safer-buffer": ">= 2.1.2 < 3"
976 | }
977 | },
978 | "inherits": {
979 | "version": "2.0.4",
980 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
981 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
982 | },
983 | "ipaddr.js": {
984 | "version": "1.9.1",
985 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
986 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
987 | },
988 | "is-property": {
989 | "version": "1.0.2",
990 | "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
991 | "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="
992 | },
993 | "long": {
994 | "version": "4.0.0",
995 | "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
996 | "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
997 | },
998 | "lru-cache": {
999 | "version": "6.0.0",
1000 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
1001 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
1002 | "requires": {
1003 | "yallist": "^4.0.0"
1004 | }
1005 | },
1006 | "media-typer": {
1007 | "version": "0.3.0",
1008 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
1009 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ=="
1010 | },
1011 | "merge-descriptors": {
1012 | "version": "1.0.1",
1013 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
1014 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
1015 | },
1016 | "methods": {
1017 | "version": "1.1.2",
1018 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
1019 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w=="
1020 | },
1021 | "mime": {
1022 | "version": "1.6.0",
1023 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
1024 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
1025 | },
1026 | "mime-db": {
1027 | "version": "1.52.0",
1028 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
1029 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
1030 | },
1031 | "mime-types": {
1032 | "version": "2.1.35",
1033 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
1034 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
1035 | "requires": {
1036 | "mime-db": "1.52.0"
1037 | }
1038 | },
1039 | "ms": {
1040 | "version": "2.0.0",
1041 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1042 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
1043 | },
1044 | "mysql2": {
1045 | "version": "2.3.3",
1046 | "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.3.3.tgz",
1047 | "integrity": "sha512-wxJUev6LgMSgACDkb/InIFxDprRa6T95+VEoR+xPvtngtccNH2dGjEB/fVZ8yg1gWv1510c9CvXuJHi5zUm0ZA==",
1048 | "requires": {
1049 | "denque": "^2.0.1",
1050 | "generate-function": "^2.3.1",
1051 | "iconv-lite": "^0.6.3",
1052 | "long": "^4.0.0",
1053 | "lru-cache": "^6.0.0",
1054 | "named-placeholders": "^1.1.2",
1055 | "seq-queue": "^0.0.5",
1056 | "sqlstring": "^2.3.2"
1057 | },
1058 | "dependencies": {
1059 | "iconv-lite": {
1060 | "version": "0.6.3",
1061 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
1062 | "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
1063 | "requires": {
1064 | "safer-buffer": ">= 2.1.2 < 3.0.0"
1065 | }
1066 | }
1067 | }
1068 | },
1069 | "named-placeholders": {
1070 | "version": "1.1.2",
1071 | "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.2.tgz",
1072 | "integrity": "sha512-wiFWqxoLL3PGVReSZpjLVxyJ1bRqe+KKJVbr4hGs1KWfTZTQyezHFBbuKj9hsizHyGV2ne7EMjHdxEGAybD5SA==",
1073 | "requires": {
1074 | "lru-cache": "^4.1.3"
1075 | },
1076 | "dependencies": {
1077 | "lru-cache": {
1078 | "version": "4.1.5",
1079 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
1080 | "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
1081 | "requires": {
1082 | "pseudomap": "^1.0.2",
1083 | "yallist": "^2.1.2"
1084 | }
1085 | },
1086 | "yallist": {
1087 | "version": "2.1.2",
1088 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
1089 | "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A=="
1090 | }
1091 | }
1092 | },
1093 | "negotiator": {
1094 | "version": "0.6.3",
1095 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
1096 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
1097 | },
1098 | "object-assign": {
1099 | "version": "4.1.1",
1100 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
1101 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="
1102 | },
1103 | "object-inspect": {
1104 | "version": "1.12.2",
1105 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
1106 | "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ=="
1107 | },
1108 | "on-finished": {
1109 | "version": "2.4.1",
1110 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
1111 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
1112 | "requires": {
1113 | "ee-first": "1.1.1"
1114 | }
1115 | },
1116 | "parseurl": {
1117 | "version": "1.3.3",
1118 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
1119 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
1120 | },
1121 | "path-to-regexp": {
1122 | "version": "0.1.7",
1123 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
1124 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
1125 | },
1126 | "proxy-addr": {
1127 | "version": "2.0.7",
1128 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
1129 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
1130 | "requires": {
1131 | "forwarded": "0.2.0",
1132 | "ipaddr.js": "1.9.1"
1133 | }
1134 | },
1135 | "pseudomap": {
1136 | "version": "1.0.2",
1137 | "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
1138 | "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ=="
1139 | },
1140 | "qs": {
1141 | "version": "6.10.3",
1142 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz",
1143 | "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
1144 | "requires": {
1145 | "side-channel": "^1.0.4"
1146 | }
1147 | },
1148 | "range-parser": {
1149 | "version": "1.2.1",
1150 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
1151 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
1152 | },
1153 | "raw-body": {
1154 | "version": "2.5.1",
1155 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
1156 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
1157 | "requires": {
1158 | "bytes": "3.1.2",
1159 | "http-errors": "2.0.0",
1160 | "iconv-lite": "0.4.24",
1161 | "unpipe": "1.0.0"
1162 | }
1163 | },
1164 | "safe-buffer": {
1165 | "version": "5.2.1",
1166 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
1167 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
1168 | },
1169 | "safer-buffer": {
1170 | "version": "2.1.2",
1171 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
1172 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
1173 | },
1174 | "send": {
1175 | "version": "0.18.0",
1176 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
1177 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
1178 | "requires": {
1179 | "debug": "2.6.9",
1180 | "depd": "2.0.0",
1181 | "destroy": "1.2.0",
1182 | "encodeurl": "~1.0.2",
1183 | "escape-html": "~1.0.3",
1184 | "etag": "~1.8.1",
1185 | "fresh": "0.5.2",
1186 | "http-errors": "2.0.0",
1187 | "mime": "1.6.0",
1188 | "ms": "2.1.3",
1189 | "on-finished": "2.4.1",
1190 | "range-parser": "~1.2.1",
1191 | "statuses": "2.0.1"
1192 | },
1193 | "dependencies": {
1194 | "ms": {
1195 | "version": "2.1.3",
1196 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
1197 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
1198 | }
1199 | }
1200 | },
1201 | "seq-queue": {
1202 | "version": "0.0.5",
1203 | "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz",
1204 | "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q=="
1205 | },
1206 | "serve-static": {
1207 | "version": "1.15.0",
1208 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
1209 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
1210 | "requires": {
1211 | "encodeurl": "~1.0.2",
1212 | "escape-html": "~1.0.3",
1213 | "parseurl": "~1.3.3",
1214 | "send": "0.18.0"
1215 | }
1216 | },
1217 | "setprototypeof": {
1218 | "version": "1.2.0",
1219 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
1220 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
1221 | },
1222 | "side-channel": {
1223 | "version": "1.0.4",
1224 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
1225 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
1226 | "requires": {
1227 | "call-bind": "^1.0.0",
1228 | "get-intrinsic": "^1.0.2",
1229 | "object-inspect": "^1.9.0"
1230 | }
1231 | },
1232 | "sqlstring": {
1233 | "version": "2.3.3",
1234 | "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz",
1235 | "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg=="
1236 | },
1237 | "statuses": {
1238 | "version": "2.0.1",
1239 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
1240 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="
1241 | },
1242 | "toidentifier": {
1243 | "version": "1.0.1",
1244 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
1245 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
1246 | },
1247 | "type-is": {
1248 | "version": "1.6.18",
1249 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
1250 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
1251 | "requires": {
1252 | "media-typer": "0.3.0",
1253 | "mime-types": "~2.1.24"
1254 | }
1255 | },
1256 | "unpipe": {
1257 | "version": "1.0.0",
1258 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
1259 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="
1260 | },
1261 | "utils-merge": {
1262 | "version": "1.0.1",
1263 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
1264 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA=="
1265 | },
1266 | "uuid": {
1267 | "version": "8.3.2",
1268 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
1269 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
1270 | },
1271 | "vary": {
1272 | "version": "1.1.2",
1273 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
1274 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
1275 | },
1276 | "yallist": {
1277 | "version": "4.0.0",
1278 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
1279 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
1280 | }
1281 | }
1282 | }
1283 |
--------------------------------------------------------------------------------
/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "node index.js"
8 | },
9 | "keywords": [],
10 | "author": "",
11 | "license": "ISC",
12 | "dependencies": {
13 | "cors": "^2.8.5",
14 | "express": "^4.18.1",
15 | "mysql2": "^2.3.3",
16 | "uuid": "^8.3.2"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/server/records/todo.record.js:
--------------------------------------------------------------------------------
1 | const {v4: uuid} = require('uuid');
2 | const {pool} = require('../utils/db');
3 |
4 | class TodoRecord {
5 | constructor(obj) {
6 | if (!obj.todo || obj.todo.length < 3 || obj.todo.length > 50) {
7 | throw new Error(
8 | 'Todo must have at least 3 characters and less than 50 characters'
9 | );
10 | }
11 |
12 | this.id = obj.id;
13 | this.todo = obj.todo;
14 | }
15 |
16 | static async listAll() {
17 | const [results] = await pool.execute('SELECT * FROM `todos`');
18 | return results.map((obj) => new TodoRecord(obj));
19 | }
20 |
21 | static async getOne(id) {
22 | const [results] = await pool.execute(
23 | 'SELECT * FROM `todos` WHERE `id` = :id',
24 | {
25 | id,
26 | }
27 | );
28 | return results.length === 0 ? null : new TodoRecord(results[0]);
29 | }
30 |
31 | async insert() {
32 | if (!this.id) {
33 | this.id = uuid();
34 | }
35 |
36 | await pool.execute('INSERT INTO `todos`(`id`,`todo`) VALUES(:id, :todo)', {
37 | id: this.id,
38 | todo: this.todo,
39 | });
40 |
41 | return this.id;
42 | }
43 |
44 | async update(id, todo) {
45 | await pool.execute('UPDATE `todos` SET `todo` = :todo WHERE `id` = :id', {
46 | id,
47 | todo,
48 | });
49 | }
50 |
51 | async delete() {
52 | await pool.execute('DELETE FROM `todos` WHERE `id` = :id', {
53 | id: this.id,
54 | });
55 | }
56 | }
57 |
58 | module.exports = {
59 | TodoRecord,
60 | };
61 |
--------------------------------------------------------------------------------
/server/routers/todos.js:
--------------------------------------------------------------------------------
1 | const {Router} = require('express');
2 | const {TodoRecord} = require('../records/todo.record');
3 | const {pool} = require('../utils/db');
4 |
5 | const TodoRouter = Router();
6 |
7 | TodoRouter.get('/', async (req, res) => {
8 | const todosList = await TodoRecord.listAll();
9 |
10 | res.send(todosList);
11 | })
12 | .post('/create', async (req, res) => {
13 | const newTodo = new TodoRecord(req.body);
14 | await newTodo.insert();
15 |
16 | res.send('Values inserted successfully');
17 | })
18 | .delete('/:id', async (req, res) => {
19 | const todo = await TodoRecord.getOne(req.params.id);
20 | await todo.delete();
21 | })
22 | .put('/update/:id', async (req, res) => {
23 | const todo = await TodoRecord.getOne(req.params.id);
24 | await todo.update(req.body.id, req.body.todo);
25 | });
26 |
27 | module.exports = {
28 | TodoRouter,
29 | };
30 |
--------------------------------------------------------------------------------
/server/utils/db.js:
--------------------------------------------------------------------------------
1 | const {createPool} = require('mysql2/promise');
2 |
3 | const pool = createPool({
4 | host: 'localhost',
5 | user: 'root',
6 | password: '',
7 | database: 'todolist',
8 | namedPlaceholders: true,
9 | });
10 |
11 | module.exports = {
12 | pool,
13 | };
14 |
--------------------------------------------------------------------------------