├── .gitignore
├── app.js
├── 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
│ ├── App.test.js
│ ├── components
│ ├── Header.js
│ ├── Home.js
│ └── Register.js
│ ├── index.css
│ ├── index.js
│ ├── logo.svg
│ ├── reportWebVitals.js
│ └── setupTests.js
├── db
└── conn.js
├── package-lock.json
├── package.json
├── routes
└── router.js
└── uploads
├── image-1663411166453.delivery-woman.png
├── image-1663411167552.delivery-woman.png
├── image-1663411168024.delivery-woman.png
├── image-1663411168930.delivery-woman.png
├── image-1663411169174.delivery-woman.png
├── image-1663411475320.man (1).png
├── image-1663411801390.man.png
└── image-1663413395066.profile.png
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
3 | .env
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | require("dotenv").config();
2 | const express = require("express");
3 | const app = express();
4 | require("./db/conn");
5 | const cors = require("cors");
6 | const router = require("./routes/router")
7 | const port = 8004;
8 |
9 |
10 | app.use(express.json());
11 | app.use(cors());
12 |
13 | app.use("/uploads",express.static("./uploads"))
14 | app.use(router)
15 |
16 | app.listen(port,()=>{
17 | console.log("server start")
18 | })
--------------------------------------------------------------------------------
/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 | "proxy": "http://localhost:8004",
6 | "dependencies": {
7 | "@testing-library/jest-dom": "^5.16.5",
8 | "@testing-library/react": "^13.4.0",
9 | "@testing-library/user-event": "^13.5.0",
10 | "axios": "^0.27.2",
11 | "bootstrap": "^5.2.1",
12 | "install": "^0.13.0",
13 | "moment": "^2.29.4",
14 | "npm": "^8.19.2",
15 | "react": "^18.2.0",
16 | "react-bootstrap": "^2.5.0",
17 | "react-dom": "^18.2.0",
18 | "react-router-dom": "^6.4.0",
19 | "react-scripts": "5.0.1",
20 | "web-vitals": "^2.1.4"
21 | },
22 | "scripts": {
23 | "start": "react-scripts start",
24 | "build": "react-scripts build",
25 | "test": "react-scripts test",
26 | "eject": "react-scripts eject"
27 | },
28 | "eslintConfig": {
29 | "extends": [
30 | "react-app",
31 | "react-app/jest"
32 | ]
33 | },
34 | "browserslist": {
35 | "production": [
36 | ">0.2%",
37 | "not dead",
38 | "not op_mini all"
39 | ],
40 | "development": [
41 | "last 1 chrome version",
42 | "last 1 firefox version",
43 | "last 1 safari version"
44 | ]
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/client/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harsh17112000/imgupload_mysql/edd16d3311f209af0fcb3bf70f1f5a2b3e6c31ea/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/harsh17112000/imgupload_mysql/edd16d3311f209af0fcb3bf70f1f5a2b3e6c31ea/client/public/logo192.png
--------------------------------------------------------------------------------
/client/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harsh17112000/imgupload_mysql/edd16d3311f209af0fcb3bf70f1f5a2b3e6c31ea/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 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | height: 40vmin;
7 | pointer-events: none;
8 | }
9 |
10 | @media (prefers-reduced-motion: no-preference) {
11 | .App-logo {
12 | animation: App-logo-spin infinite 20s linear;
13 | }
14 | }
15 |
16 | .App-header {
17 | background-color: #282c34;
18 | min-height: 100vh;
19 | display: flex;
20 | flex-direction: column;
21 | align-items: center;
22 | justify-content: center;
23 | font-size: calc(10px + 2vmin);
24 | color: white;
25 | }
26 |
27 | .App-link {
28 | color: #61dafb;
29 | }
30 |
31 | @keyframes App-logo-spin {
32 | from {
33 | transform: rotate(0deg);
34 | }
35 | to {
36 | transform: rotate(360deg);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/client/src/App.js:
--------------------------------------------------------------------------------
1 | import './App.css';
2 | import Header from './components/Header';
3 | import Home from './components/Home';
4 | import Register from './components/Register';
5 | import 'bootstrap/dist/css/bootstrap.min.css';
6 | import {Routes,Route} from "react-router-dom"
7 |
8 | function App() {
9 | return (
10 | <>
11 |
12 |
13 | } />
14 | } />
15 |
16 |
17 | >
18 | );
19 | }
20 |
21 | export default App;
22 |
--------------------------------------------------------------------------------
/client/src/App.test.js:
--------------------------------------------------------------------------------
1 | import { render, screen } from '@testing-library/react';
2 | import App from './App';
3 |
4 | test('renders learn react link', () => {
5 | render( );
6 | const linkElement = screen.getByText(/learn react/i);
7 | expect(linkElement).toBeInTheDocument();
8 | });
9 |
--------------------------------------------------------------------------------
/client/src/components/Header.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Container from 'react-bootstrap/Container';
3 | import Nav from 'react-bootstrap/Nav';
4 | import Navbar from 'react-bootstrap/Navbar';
5 |
6 | const Header = () => {
7 | return (
8 | <>
9 |
10 |
11 | Home
12 |
13 | Register
14 |
15 |
16 |
17 | >
18 | )
19 | }
20 |
21 | export default Header
--------------------------------------------------------------------------------
/client/src/components/Home.js:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from 'react'
2 | import Button from 'react-bootstrap/Button';
3 | import { NavLink } from "react-router-dom"
4 | import Card from 'react-bootstrap/Card';
5 | import axios from 'axios';
6 | import moment from "moment"
7 | import Alert from 'react-bootstrap/Alert';
8 |
9 | const Home = () => {
10 |
11 | const [data, setData] = useState([]);
12 |
13 | const [show, setShow] = useState(false);
14 |
15 | const getUserData = async () => {
16 | const res = await axios.get("/getdata", {
17 | headers: {
18 | "Content-Type": "application/json"
19 | }
20 | });
21 |
22 | if (res.data.status == 201) {
23 | console.log("data get");
24 | setData(res.data.data)
25 |
26 | } else {
27 | console.log("error")
28 | }
29 | }
30 |
31 |
32 | const dltUser = async (id) => {
33 | console.log(id)
34 | const res = await axios.delete(`/${id}`, {
35 | headers: {
36 | "Content-Type": "application/json"
37 | }
38 | });
39 |
40 | if (res.data.status == 201) {
41 | getUserData()
42 | setShow(true)
43 | } else {
44 | console.log("error")
45 | }
46 | }
47 |
48 | useEffect(() => {
49 | getUserData()
50 | }, [])
51 |
52 | return (
53 | <>
54 | {
55 | show ? setShow(false)} dismissible>
56 | User Delete
57 | : ""
58 | }
59 |
60 |
Image Upload Projects With Mysql database
61 |
62 |
63 | Add User
64 |
65 |
66 |
67 | {
68 | data.length > 0 ? data.map((el, i) => {
69 | return (
70 | <>
71 |
72 |
73 |
74 | UserName : {el.username}
75 |
76 | Date Added : {moment(el.date).format("DD-MM-YYYY")}
77 |
78 | dltUser(el.id)} className='col-lg-6 text-center'>Delete
79 |
80 |
81 | >
82 | )
83 | }) : ""
84 | }
85 |
86 |
87 |
88 | >
89 | )
90 | }
91 |
92 | export default Home
--------------------------------------------------------------------------------
/client/src/components/Register.js:
--------------------------------------------------------------------------------
1 | import React, { useState } from 'react'
2 | import Button from 'react-bootstrap/Button';
3 | import Form from 'react-bootstrap/Form';
4 | import axios from "axios"
5 | import {useNavigate} from "react-router-dom"
6 |
7 | const Register = () => {
8 |
9 | const [fname,setFName] = useState("");
10 | const [file,setFile] = useState("");
11 |
12 | const history = useNavigate();
13 |
14 | const setdata = (e)=>{
15 | setFName(e.target.value)
16 | }
17 |
18 | const setimgfile = (e)=>{
19 | setFile(e.target.files[0])
20 | }
21 |
22 | const addUserData = async(e)=>{
23 | e.preventDefault();
24 |
25 | var formData = new FormData();
26 | formData.append("photo",file)
27 | formData.append("fname",fname);
28 |
29 | const config = {
30 | headers:{
31 | "Content-Type":"multipart/form-data"
32 | }
33 | }
34 |
35 | const res = await axios.post("/register",formData,config);
36 |
37 | if(res.data.status == 201){
38 | history("/")
39 | }else{
40 | console.log("error")
41 | }
42 | }
43 |
44 | return (
45 | <>
46 |
47 |
Upload Your Img Here
48 |
49 |
51 | UserName
52 |
53 |
54 |
55 |
56 | Select Your Image
57 |
58 |
59 |
60 | Submit
61 |
62 |
63 |
64 | >
65 | )
66 | }
67 |
68 | export default Register
--------------------------------------------------------------------------------
/client/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/client/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom/client';
3 | import './index.css';
4 | import App from './App';
5 | import {BrowserRouter} from "react-router-dom"
6 |
7 | const root = ReactDOM.createRoot(document.getElementById('root'));
8 | root.render(
9 |
10 |
11 |
12 | );
13 |
14 |
--------------------------------------------------------------------------------
/client/src/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/client/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------
/db/conn.js:
--------------------------------------------------------------------------------
1 | const mysql = require("mysql2");
2 |
3 |
4 | const conn = mysql.createConnection({
5 | user:process.env.USER,
6 | host:process.env.HOST,
7 | password:process.env.PASSWORD,
8 | database:process.env.DATABASE
9 | });
10 |
11 | conn.connect((error)=>{
12 | if(error) throw error;
13 | console.log("connected !")
14 | });
15 |
16 | module.exports = conn
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "img_react_mysql",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "accepts": {
8 | "version": "1.3.8",
9 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
10 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
11 | "requires": {
12 | "mime-types": "~2.1.34",
13 | "negotiator": "0.6.3"
14 | }
15 | },
16 | "append-field": {
17 | "version": "1.0.0",
18 | "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
19 | "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw=="
20 | },
21 | "array-flatten": {
22 | "version": "1.1.1",
23 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
24 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
25 | },
26 | "body-parser": {
27 | "version": "1.20.0",
28 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz",
29 | "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==",
30 | "requires": {
31 | "bytes": "3.1.2",
32 | "content-type": "~1.0.4",
33 | "debug": "2.6.9",
34 | "depd": "2.0.0",
35 | "destroy": "1.2.0",
36 | "http-errors": "2.0.0",
37 | "iconv-lite": "0.4.24",
38 | "on-finished": "2.4.1",
39 | "qs": "6.10.3",
40 | "raw-body": "2.5.1",
41 | "type-is": "~1.6.18",
42 | "unpipe": "1.0.0"
43 | }
44 | },
45 | "buffer-from": {
46 | "version": "1.1.2",
47 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
48 | "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
49 | },
50 | "busboy": {
51 | "version": "1.6.0",
52 | "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
53 | "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
54 | "requires": {
55 | "streamsearch": "^1.1.0"
56 | }
57 | },
58 | "bytes": {
59 | "version": "3.1.2",
60 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
61 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="
62 | },
63 | "call-bind": {
64 | "version": "1.0.2",
65 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
66 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
67 | "requires": {
68 | "function-bind": "^1.1.1",
69 | "get-intrinsic": "^1.0.2"
70 | }
71 | },
72 | "concat-stream": {
73 | "version": "1.6.2",
74 | "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
75 | "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
76 | "requires": {
77 | "buffer-from": "^1.0.0",
78 | "inherits": "^2.0.3",
79 | "readable-stream": "^2.2.2",
80 | "typedarray": "^0.0.6"
81 | }
82 | },
83 | "content-disposition": {
84 | "version": "0.5.4",
85 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
86 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
87 | "requires": {
88 | "safe-buffer": "5.2.1"
89 | }
90 | },
91 | "content-type": {
92 | "version": "1.0.4",
93 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
94 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
95 | },
96 | "cookie": {
97 | "version": "0.5.0",
98 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
99 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw=="
100 | },
101 | "cookie-signature": {
102 | "version": "1.0.6",
103 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
104 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
105 | },
106 | "core-util-is": {
107 | "version": "1.0.3",
108 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
109 | "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
110 | },
111 | "cors": {
112 | "version": "2.8.5",
113 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
114 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
115 | "requires": {
116 | "object-assign": "^4",
117 | "vary": "^1"
118 | }
119 | },
120 | "debug": {
121 | "version": "2.6.9",
122 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
123 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
124 | "requires": {
125 | "ms": "2.0.0"
126 | }
127 | },
128 | "denque": {
129 | "version": "2.1.0",
130 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
131 | "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="
132 | },
133 | "depd": {
134 | "version": "2.0.0",
135 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
136 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="
137 | },
138 | "destroy": {
139 | "version": "1.2.0",
140 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
141 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="
142 | },
143 | "dotenv": {
144 | "version": "16.0.2",
145 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.2.tgz",
146 | "integrity": "sha512-JvpYKUmzQhYoIFgK2MOnF3bciIZoItIIoryihy0rIA+H4Jy0FmgyKYAHCTN98P5ybGSJcIFbh6QKeJdtZd1qhA=="
147 | },
148 | "ee-first": {
149 | "version": "1.1.1",
150 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
151 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
152 | },
153 | "encodeurl": {
154 | "version": "1.0.2",
155 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
156 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="
157 | },
158 | "escape-html": {
159 | "version": "1.0.3",
160 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
161 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
162 | },
163 | "etag": {
164 | "version": "1.8.1",
165 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
166 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="
167 | },
168 | "express": {
169 | "version": "4.18.1",
170 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz",
171 | "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==",
172 | "requires": {
173 | "accepts": "~1.3.8",
174 | "array-flatten": "1.1.1",
175 | "body-parser": "1.20.0",
176 | "content-disposition": "0.5.4",
177 | "content-type": "~1.0.4",
178 | "cookie": "0.5.0",
179 | "cookie-signature": "1.0.6",
180 | "debug": "2.6.9",
181 | "depd": "2.0.0",
182 | "encodeurl": "~1.0.2",
183 | "escape-html": "~1.0.3",
184 | "etag": "~1.8.1",
185 | "finalhandler": "1.2.0",
186 | "fresh": "0.5.2",
187 | "http-errors": "2.0.0",
188 | "merge-descriptors": "1.0.1",
189 | "methods": "~1.1.2",
190 | "on-finished": "2.4.1",
191 | "parseurl": "~1.3.3",
192 | "path-to-regexp": "0.1.7",
193 | "proxy-addr": "~2.0.7",
194 | "qs": "6.10.3",
195 | "range-parser": "~1.2.1",
196 | "safe-buffer": "5.2.1",
197 | "send": "0.18.0",
198 | "serve-static": "1.15.0",
199 | "setprototypeof": "1.2.0",
200 | "statuses": "2.0.1",
201 | "type-is": "~1.6.18",
202 | "utils-merge": "1.0.1",
203 | "vary": "~1.1.2"
204 | }
205 | },
206 | "finalhandler": {
207 | "version": "1.2.0",
208 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
209 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
210 | "requires": {
211 | "debug": "2.6.9",
212 | "encodeurl": "~1.0.2",
213 | "escape-html": "~1.0.3",
214 | "on-finished": "2.4.1",
215 | "parseurl": "~1.3.3",
216 | "statuses": "2.0.1",
217 | "unpipe": "~1.0.0"
218 | }
219 | },
220 | "forwarded": {
221 | "version": "0.2.0",
222 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
223 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="
224 | },
225 | "fresh": {
226 | "version": "0.5.2",
227 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
228 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="
229 | },
230 | "function-bind": {
231 | "version": "1.1.1",
232 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
233 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
234 | },
235 | "generate-function": {
236 | "version": "2.3.1",
237 | "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
238 | "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
239 | "requires": {
240 | "is-property": "^1.0.2"
241 | }
242 | },
243 | "get-intrinsic": {
244 | "version": "1.1.3",
245 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz",
246 | "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==",
247 | "requires": {
248 | "function-bind": "^1.1.1",
249 | "has": "^1.0.3",
250 | "has-symbols": "^1.0.3"
251 | }
252 | },
253 | "has": {
254 | "version": "1.0.3",
255 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
256 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
257 | "requires": {
258 | "function-bind": "^1.1.1"
259 | }
260 | },
261 | "has-symbols": {
262 | "version": "1.0.3",
263 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
264 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
265 | },
266 | "http-errors": {
267 | "version": "2.0.0",
268 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
269 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
270 | "requires": {
271 | "depd": "2.0.0",
272 | "inherits": "2.0.4",
273 | "setprototypeof": "1.2.0",
274 | "statuses": "2.0.1",
275 | "toidentifier": "1.0.1"
276 | }
277 | },
278 | "iconv-lite": {
279 | "version": "0.4.24",
280 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
281 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
282 | "requires": {
283 | "safer-buffer": ">= 2.1.2 < 3"
284 | }
285 | },
286 | "inherits": {
287 | "version": "2.0.4",
288 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
289 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
290 | },
291 | "ipaddr.js": {
292 | "version": "1.9.1",
293 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
294 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
295 | },
296 | "is-property": {
297 | "version": "1.0.2",
298 | "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
299 | "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="
300 | },
301 | "isarray": {
302 | "version": "1.0.0",
303 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
304 | "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
305 | },
306 | "long": {
307 | "version": "4.0.0",
308 | "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
309 | "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
310 | },
311 | "lru-cache": {
312 | "version": "6.0.0",
313 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
314 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
315 | "requires": {
316 | "yallist": "^4.0.0"
317 | }
318 | },
319 | "media-typer": {
320 | "version": "0.3.0",
321 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
322 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ=="
323 | },
324 | "merge-descriptors": {
325 | "version": "1.0.1",
326 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
327 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
328 | },
329 | "methods": {
330 | "version": "1.1.2",
331 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
332 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w=="
333 | },
334 | "mime": {
335 | "version": "1.6.0",
336 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
337 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
338 | },
339 | "mime-db": {
340 | "version": "1.52.0",
341 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
342 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
343 | },
344 | "mime-types": {
345 | "version": "2.1.35",
346 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
347 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
348 | "requires": {
349 | "mime-db": "1.52.0"
350 | }
351 | },
352 | "minimist": {
353 | "version": "1.2.6",
354 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
355 | "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
356 | },
357 | "mkdirp": {
358 | "version": "0.5.6",
359 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
360 | "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
361 | "requires": {
362 | "minimist": "^1.2.6"
363 | }
364 | },
365 | "moment": {
366 | "version": "2.29.4",
367 | "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
368 | "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
369 | },
370 | "ms": {
371 | "version": "2.0.0",
372 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
373 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
374 | },
375 | "multer": {
376 | "version": "1.4.5-lts.1",
377 | "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.5-lts.1.tgz",
378 | "integrity": "sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ==",
379 | "requires": {
380 | "append-field": "^1.0.0",
381 | "busboy": "^1.0.0",
382 | "concat-stream": "^1.5.2",
383 | "mkdirp": "^0.5.4",
384 | "object-assign": "^4.1.1",
385 | "type-is": "^1.6.4",
386 | "xtend": "^4.0.0"
387 | }
388 | },
389 | "mysql2": {
390 | "version": "2.3.3",
391 | "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.3.3.tgz",
392 | "integrity": "sha512-wxJUev6LgMSgACDkb/InIFxDprRa6T95+VEoR+xPvtngtccNH2dGjEB/fVZ8yg1gWv1510c9CvXuJHi5zUm0ZA==",
393 | "requires": {
394 | "denque": "^2.0.1",
395 | "generate-function": "^2.3.1",
396 | "iconv-lite": "^0.6.3",
397 | "long": "^4.0.0",
398 | "lru-cache": "^6.0.0",
399 | "named-placeholders": "^1.1.2",
400 | "seq-queue": "^0.0.5",
401 | "sqlstring": "^2.3.2"
402 | },
403 | "dependencies": {
404 | "iconv-lite": {
405 | "version": "0.6.3",
406 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
407 | "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
408 | "requires": {
409 | "safer-buffer": ">= 2.1.2 < 3.0.0"
410 | }
411 | }
412 | }
413 | },
414 | "named-placeholders": {
415 | "version": "1.1.2",
416 | "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.2.tgz",
417 | "integrity": "sha512-wiFWqxoLL3PGVReSZpjLVxyJ1bRqe+KKJVbr4hGs1KWfTZTQyezHFBbuKj9hsizHyGV2ne7EMjHdxEGAybD5SA==",
418 | "requires": {
419 | "lru-cache": "^4.1.3"
420 | },
421 | "dependencies": {
422 | "lru-cache": {
423 | "version": "4.1.5",
424 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
425 | "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
426 | "requires": {
427 | "pseudomap": "^1.0.2",
428 | "yallist": "^2.1.2"
429 | }
430 | },
431 | "yallist": {
432 | "version": "2.1.2",
433 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
434 | "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A=="
435 | }
436 | }
437 | },
438 | "negotiator": {
439 | "version": "0.6.3",
440 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
441 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
442 | },
443 | "object-assign": {
444 | "version": "4.1.1",
445 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
446 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="
447 | },
448 | "object-inspect": {
449 | "version": "1.12.2",
450 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
451 | "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ=="
452 | },
453 | "on-finished": {
454 | "version": "2.4.1",
455 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
456 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
457 | "requires": {
458 | "ee-first": "1.1.1"
459 | }
460 | },
461 | "parseurl": {
462 | "version": "1.3.3",
463 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
464 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
465 | },
466 | "path-to-regexp": {
467 | "version": "0.1.7",
468 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
469 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
470 | },
471 | "process-nextick-args": {
472 | "version": "2.0.1",
473 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
474 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
475 | },
476 | "proxy-addr": {
477 | "version": "2.0.7",
478 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
479 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
480 | "requires": {
481 | "forwarded": "0.2.0",
482 | "ipaddr.js": "1.9.1"
483 | }
484 | },
485 | "pseudomap": {
486 | "version": "1.0.2",
487 | "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
488 | "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ=="
489 | },
490 | "qs": {
491 | "version": "6.10.3",
492 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz",
493 | "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
494 | "requires": {
495 | "side-channel": "^1.0.4"
496 | }
497 | },
498 | "range-parser": {
499 | "version": "1.2.1",
500 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
501 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
502 | },
503 | "raw-body": {
504 | "version": "2.5.1",
505 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
506 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
507 | "requires": {
508 | "bytes": "3.1.2",
509 | "http-errors": "2.0.0",
510 | "iconv-lite": "0.4.24",
511 | "unpipe": "1.0.0"
512 | }
513 | },
514 | "readable-stream": {
515 | "version": "2.3.7",
516 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
517 | "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
518 | "requires": {
519 | "core-util-is": "~1.0.0",
520 | "inherits": "~2.0.3",
521 | "isarray": "~1.0.0",
522 | "process-nextick-args": "~2.0.0",
523 | "safe-buffer": "~5.1.1",
524 | "string_decoder": "~1.1.1",
525 | "util-deprecate": "~1.0.1"
526 | },
527 | "dependencies": {
528 | "safe-buffer": {
529 | "version": "5.1.2",
530 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
531 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
532 | }
533 | }
534 | },
535 | "safe-buffer": {
536 | "version": "5.2.1",
537 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
538 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
539 | },
540 | "safer-buffer": {
541 | "version": "2.1.2",
542 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
543 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
544 | },
545 | "send": {
546 | "version": "0.18.0",
547 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
548 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
549 | "requires": {
550 | "debug": "2.6.9",
551 | "depd": "2.0.0",
552 | "destroy": "1.2.0",
553 | "encodeurl": "~1.0.2",
554 | "escape-html": "~1.0.3",
555 | "etag": "~1.8.1",
556 | "fresh": "0.5.2",
557 | "http-errors": "2.0.0",
558 | "mime": "1.6.0",
559 | "ms": "2.1.3",
560 | "on-finished": "2.4.1",
561 | "range-parser": "~1.2.1",
562 | "statuses": "2.0.1"
563 | },
564 | "dependencies": {
565 | "ms": {
566 | "version": "2.1.3",
567 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
568 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
569 | }
570 | }
571 | },
572 | "seq-queue": {
573 | "version": "0.0.5",
574 | "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz",
575 | "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q=="
576 | },
577 | "serve-static": {
578 | "version": "1.15.0",
579 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
580 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
581 | "requires": {
582 | "encodeurl": "~1.0.2",
583 | "escape-html": "~1.0.3",
584 | "parseurl": "~1.3.3",
585 | "send": "0.18.0"
586 | }
587 | },
588 | "setprototypeof": {
589 | "version": "1.2.0",
590 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
591 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
592 | },
593 | "side-channel": {
594 | "version": "1.0.4",
595 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
596 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
597 | "requires": {
598 | "call-bind": "^1.0.0",
599 | "get-intrinsic": "^1.0.2",
600 | "object-inspect": "^1.9.0"
601 | }
602 | },
603 | "sqlstring": {
604 | "version": "2.3.3",
605 | "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz",
606 | "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg=="
607 | },
608 | "statuses": {
609 | "version": "2.0.1",
610 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
611 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="
612 | },
613 | "streamsearch": {
614 | "version": "1.1.0",
615 | "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
616 | "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg=="
617 | },
618 | "string_decoder": {
619 | "version": "1.1.1",
620 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
621 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
622 | "requires": {
623 | "safe-buffer": "~5.1.0"
624 | },
625 | "dependencies": {
626 | "safe-buffer": {
627 | "version": "5.1.2",
628 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
629 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
630 | }
631 | }
632 | },
633 | "toidentifier": {
634 | "version": "1.0.1",
635 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
636 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
637 | },
638 | "type-is": {
639 | "version": "1.6.18",
640 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
641 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
642 | "requires": {
643 | "media-typer": "0.3.0",
644 | "mime-types": "~2.1.24"
645 | }
646 | },
647 | "typedarray": {
648 | "version": "0.0.6",
649 | "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
650 | "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA=="
651 | },
652 | "unpipe": {
653 | "version": "1.0.0",
654 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
655 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="
656 | },
657 | "util-deprecate": {
658 | "version": "1.0.2",
659 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
660 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
661 | },
662 | "utils-merge": {
663 | "version": "1.0.1",
664 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
665 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA=="
666 | },
667 | "vary": {
668 | "version": "1.1.2",
669 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
670 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
671 | },
672 | "xtend": {
673 | "version": "4.0.2",
674 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
675 | "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
676 | },
677 | "yallist": {
678 | "version": "4.0.0",
679 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
680 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
681 | }
682 | }
683 | }
684 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "img_react_mysql",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "keywords": [],
10 | "author": "",
11 | "license": "ISC",
12 | "dependencies": {
13 | "cors": "^2.8.5",
14 | "dotenv": "^16.0.2",
15 | "express": "^4.18.1",
16 | "moment": "^2.29.4",
17 | "multer": "^1.4.5-lts.1",
18 | "mysql2": "^2.3.3"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/routes/router.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | const router = new express.Router();
3 | const conn = require("../db/conn");
4 | const multer = require("multer");
5 | const moment = require("moment")
6 |
7 |
8 | // img storage confing
9 | var imgconfig = multer.diskStorage({
10 | destination:(req,file,callback)=>{
11 | callback(null,"./uploads");
12 | },
13 | filename:(req,file,callback)=>{
14 | callback(null,`image-${Date.now()}.${file.originalname}`)
15 | }
16 | });
17 |
18 |
19 | // img filter
20 | const isImage = (req,file,callback)=>{
21 | if(file.mimetype.startsWith("image")){
22 | callback(null,true)
23 | }else{
24 | callback(null,Error("only image is allowd"))
25 | }
26 | }
27 |
28 | var upload = multer({
29 | storage:imgconfig,
30 | fileFilter:isImage
31 | })
32 |
33 |
34 |
35 | // register userdata
36 | router.post("/register",upload.single("photo"),(req,res)=>{
37 | const {fname} = req.body;
38 | const {filename} = req.file;
39 |
40 |
41 | if(!fname || !filename){
42 | res.status(422).json({status:422,message:"fill all the details"})
43 | }
44 |
45 | try {
46 |
47 | let date = moment(new Date()).format("YYYY-MM-DD hh:mm:ss");
48 |
49 | conn.query("INSERT INTO usersdata SET ?",{username:fname,userimg:filename,date:date},(err,result)=>{
50 | if(err){
51 | console.log("error")
52 | }else{
53 | console.log("data added")
54 | res.status(201).json({status:201,data:req.body})
55 | }
56 | })
57 | } catch (error) {
58 | res.status(422).json({status:422,error})
59 | }
60 | });
61 |
62 |
63 | // get user data
64 | router.get("/getdata",(req,res)=>{
65 | try {
66 | conn.query("SELECT * FROM usersdata",(err,result)=>{
67 | if(err){
68 | console.log("error")
69 | }else{
70 | console.log("data get")
71 | res.status(201).json({status:201,data:result})
72 | }
73 | })
74 | } catch (error) {
75 | res.status(422).json({status:422,error})
76 | }
77 | });
78 |
79 |
80 | // delete user
81 | router.delete("/:id",(req,res)=>{
82 | const {id} = req.params;
83 | try {
84 | conn.query(`DELETE FROM usersdata WHERE id ='${id}'`,(err,result)=>{
85 | if(err){
86 | console.log("error")
87 | }else{
88 | console.log("data delete")
89 | res.status(201).json({status:201,data:result})
90 | }
91 | })
92 | } catch (error) {
93 | res.status(422).json({status:422,error})
94 | }
95 | })
96 |
97 |
98 |
99 | module.exports = router;
--------------------------------------------------------------------------------
/uploads/image-1663411166453.delivery-woman.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harsh17112000/imgupload_mysql/edd16d3311f209af0fcb3bf70f1f5a2b3e6c31ea/uploads/image-1663411166453.delivery-woman.png
--------------------------------------------------------------------------------
/uploads/image-1663411167552.delivery-woman.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harsh17112000/imgupload_mysql/edd16d3311f209af0fcb3bf70f1f5a2b3e6c31ea/uploads/image-1663411167552.delivery-woman.png
--------------------------------------------------------------------------------
/uploads/image-1663411168024.delivery-woman.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harsh17112000/imgupload_mysql/edd16d3311f209af0fcb3bf70f1f5a2b3e6c31ea/uploads/image-1663411168024.delivery-woman.png
--------------------------------------------------------------------------------
/uploads/image-1663411168930.delivery-woman.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harsh17112000/imgupload_mysql/edd16d3311f209af0fcb3bf70f1f5a2b3e6c31ea/uploads/image-1663411168930.delivery-woman.png
--------------------------------------------------------------------------------
/uploads/image-1663411169174.delivery-woman.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harsh17112000/imgupload_mysql/edd16d3311f209af0fcb3bf70f1f5a2b3e6c31ea/uploads/image-1663411169174.delivery-woman.png
--------------------------------------------------------------------------------
/uploads/image-1663411475320.man (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harsh17112000/imgupload_mysql/edd16d3311f209af0fcb3bf70f1f5a2b3e6c31ea/uploads/image-1663411475320.man (1).png
--------------------------------------------------------------------------------
/uploads/image-1663411801390.man.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harsh17112000/imgupload_mysql/edd16d3311f209af0fcb3bf70f1f5a2b3e6c31ea/uploads/image-1663411801390.man.png
--------------------------------------------------------------------------------
/uploads/image-1663413395066.profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harsh17112000/imgupload_mysql/edd16d3311f209af0fcb3bf70f1f5a2b3e6c31ea/uploads/image-1663413395066.profile.png
--------------------------------------------------------------------------------