Toggle navigation
Toggle navigation
This project
Loading...
Sign in
최은석
/
ossw-project
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
최은석
2022-05-30 21:25:47 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c143bf3cf5f58c010214f9124bb5082f46cd9459
c143bf3c
1 parent
d2156222
mongoDB post save test
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
556 additions
and
14 deletions
client/package.json
package-lock.json
package.json
server/Router/api.js
server/Router/test.js
server/server.js
client/package.json
View file @
c143bf3
...
...
@@ -6,6 +6,7 @@
"@testing-library/jest-dom"
:
"^5.16.4"
,
"@testing-library/react"
:
"^13.3.0"
,
"@testing-library/user-event"
:
"^13.5.0"
,
"axios"
:
"^0.27.2"
,
"react"
:
"^18.1.0"
,
"react-dom"
:
"^18.1.0"
,
"react-scripts"
:
"5.0.1"
,
...
...
package-lock.json
View file @
c143bf3
{
"name"
:
"
reactTes
t"
,
"name"
:
"
ossw-projec
t"
,
"lockfileVersion"
:
2
,
"requires"
:
true
,
"packages"
:
{
...
...
@@ -9,6 +9,7 @@
"concurrently"
:
"^7.2.1"
,
"express"
:
"^4.18.1"
,
"http-proxy-middleware"
:
"^2.0.6"
,
"mongoose"
:
"^6.3.4"
,
"nodemon"
:
"^2.0.16"
}
},
...
...
@@ -44,6 +45,20 @@
"resolved"
:
"https://registry.npmjs.org/@types/node/-/node-17.0.36.tgz"
,
"integrity"
:
"sha512-V3orv+ggDsWVHP99K3JlwtH20R7J4IhI1Kksgc+64q5VxgfRkQG8Ws3MFm/FZOKDYGy9feGFlZ70/HpCNe9QaA=="
},
"node_modules/@types/webidl-conversions"
:
{
"version"
:
"6.1.1"
,
"resolved"
:
"https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz"
,
"integrity"
:
"sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q=="
},
"node_modules/@types/whatwg-url"
:
{
"version"
:
"8.2.1"
,
"resolved"
:
"https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz"
,
"integrity"
:
"sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ=="
,
"dependencies"
:
{
"@types/node"
:
"*"
,
"@types/webidl-conversions"
:
"*"
}
},
"node_modules/abbrev"
:
{
"version"
:
"1.1.1"
,
"resolved"
:
"https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz"
,
...
...
@@ -127,6 +142,25 @@
"resolved"
:
"https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz"
,
"integrity"
:
"sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"node_modules/base64-js"
:
{
"version"
:
"1.5.1"
,
"resolved"
:
"https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz"
,
"integrity"
:
"sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
,
"funding"
:
[
{
"type"
:
"github"
,
"url"
:
"https://github.com/sponsors/feross"
},
{
"type"
:
"patreon"
,
"url"
:
"https://www.patreon.com/feross"
},
{
"type"
:
"consulting"
,
"url"
:
"https://feross.org/support"
}
]
},
"node_modules/binary-extensions"
:
{
"version"
:
"2.2.0"
,
"resolved"
:
"https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz"
,
...
...
@@ -199,6 +233,40 @@
"node"
:
">=8"
}
},
"node_modules/bson"
:
{
"version"
:
"4.6.4"
,
"resolved"
:
"https://registry.npmjs.org/bson/-/bson-4.6.4.tgz"
,
"integrity"
:
"sha512-TdQ3FzguAu5HKPPlr0kYQCyrYUYh8tFM+CMTpxjNzVzxeiJY00Rtuj3LXLHSgiGvmaWlZ8PE+4KyM2thqE38pQ=="
,
"dependencies"
:
{
"buffer"
:
"^5.6.0"
},
"engines"
:
{
"node"
:
">=6.9.0"
}
},
"node_modules/buffer"
:
{
"version"
:
"5.7.1"
,
"resolved"
:
"https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz"
,
"integrity"
:
"sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="
,
"funding"
:
[
{
"type"
:
"github"
,
"url"
:
"https://github.com/sponsors/feross"
},
{
"type"
:
"patreon"
,
"url"
:
"https://www.patreon.com/feross"
},
{
"type"
:
"consulting"
,
"url"
:
"https://feross.org/support"
}
],
"dependencies"
:
{
"base64-js"
:
"^1.3.1"
,
"ieee754"
:
"^1.1.13"
}
},
"node_modules/bytes"
:
{
"version"
:
"3.1.2"
,
"resolved"
:
"https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz"
,
...
...
@@ -547,6 +615,14 @@
"node"
:
">=0.4.0"
}
},
"node_modules/denque"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/denque/-/denque-2.0.1.tgz"
,
"integrity"
:
"sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ=="
,
"engines"
:
{
"node"
:
">=0.10"
}
},
"node_modules/depd"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/depd/-/depd-2.0.0.tgz"
,
...
...
@@ -963,6 +1039,25 @@
"node"
:
">=0.10.0"
}
},
"node_modules/ieee754"
:
{
"version"
:
"1.2.1"
,
"resolved"
:
"https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz"
,
"integrity"
:
"sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
,
"funding"
:
[
{
"type"
:
"github"
,
"url"
:
"https://github.com/sponsors/feross"
},
{
"type"
:
"patreon"
,
"url"
:
"https://www.patreon.com/feross"
},
{
"type"
:
"consulting"
,
"url"
:
"https://feross.org/support"
}
]
},
"node_modules/ignore-by-default"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz"
,
...
...
@@ -997,6 +1092,11 @@
"node"
:
">=10"
}
},
"node_modules/ip"
:
{
"version"
:
"1.1.8"
,
"resolved"
:
"https://registry.npmjs.org/ip/-/ip-1.1.8.tgz"
,
"integrity"
:
"sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg=="
},
"node_modules/ipaddr.js"
:
{
"version"
:
"1.9.1"
,
"resolved"
:
"https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz"
,
...
...
@@ -1130,6 +1230,11 @@
"resolved"
:
"https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz"
,
"integrity"
:
"sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ=="
},
"node_modules/kareem"
:
{
"version"
:
"2.3.5"
,
"resolved"
:
"https://registry.npmjs.org/kareem/-/kareem-2.3.5.tgz"
,
"integrity"
:
"sha512-qxCyQtp3ioawkiRNQr/v8xw9KIviMSSNmy+63Wubj7KmMn3g7noRXIZB4vPCAP+ETi2SR8eH6CvmlKZuGpoHOg=="
},
"node_modules/keyv"
:
{
"version"
:
"3.1.0"
,
"resolved"
:
"https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz"
,
...
...
@@ -1203,6 +1308,12 @@
"node"
:
">= 0.6"
}
},
"node_modules/memory-pager"
:
{
"version"
:
"1.5.0"
,
"resolved"
:
"https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz"
,
"integrity"
:
"sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg=="
,
"optional"
:
true
},
"node_modules/merge-descriptors"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
,
...
...
@@ -1282,6 +1393,98 @@
"resolved"
:
"https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz"
,
"integrity"
:
"sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"node_modules/mongodb"
:
{
"version"
:
"4.5.0"
,
"resolved"
:
"https://registry.npmjs.org/mongodb/-/mongodb-4.5.0.tgz"
,
"integrity"
:
"sha512-A2l8MjEpKojnhbCM0MK3+UOGUSGvTNNSv7AkP1fsT7tkambrkkqN/5F2y+PhzsV0Nbv58u04TETpkaSEdI2zKA=="
,
"dependencies"
:
{
"bson"
:
"^4.6.2"
,
"denque"
:
"^2.0.1"
,
"mongodb-connection-string-url"
:
"^2.5.2"
,
"socks"
:
"^2.6.2"
},
"engines"
:
{
"node"
:
">=12.9.0"
},
"optionalDependencies"
:
{
"saslprep"
:
"^1.0.3"
}
},
"node_modules/mongodb-connection-string-url"
:
{
"version"
:
"2.5.2"
,
"resolved"
:
"https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.2.tgz"
,
"integrity"
:
"sha512-tWDyIG8cQlI5k3skB6ywaEA5F9f5OntrKKsT/Lteub2zgwSUlhqEN2inGgBTm8bpYJf8QYBdA/5naz65XDpczA=="
,
"dependencies"
:
{
"@types/whatwg-url"
:
"^8.2.1"
,
"whatwg-url"
:
"^11.0.0"
}
},
"node_modules/mongoose"
:
{
"version"
:
"6.3.4"
,
"resolved"
:
"https://registry.npmjs.org/mongoose/-/mongoose-6.3.4.tgz"
,
"integrity"
:
"sha512-UP0azyGMdY+2YNbJUHeHhnVw5vPzCqs4GQDUwHkilif/rwmSZktUQhQWMp1pUgRNeF2JC30vWGLrInZxD7K/Qw=="
,
"dependencies"
:
{
"bson"
:
"^4.6.2"
,
"kareem"
:
"2.3.5"
,
"mongodb"
:
"4.5.0"
,
"mpath"
:
"0.9.0"
,
"mquery"
:
"4.0.3"
,
"ms"
:
"2.1.3"
,
"sift"
:
"16.0.0"
},
"engines"
:
{
"node"
:
">=12.0.0"
},
"funding"
:
{
"type"
:
"opencollective"
,
"url"
:
"https://opencollective.com/mongoose"
}
},
"node_modules/mongoose/node_modules/ms"
:
{
"version"
:
"2.1.3"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz"
,
"integrity"
:
"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"node_modules/mpath"
:
{
"version"
:
"0.9.0"
,
"resolved"
:
"https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz"
,
"integrity"
:
"sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew=="
,
"engines"
:
{
"node"
:
">=4.0.0"
}
},
"node_modules/mquery"
:
{
"version"
:
"4.0.3"
,
"resolved"
:
"https://registry.npmjs.org/mquery/-/mquery-4.0.3.tgz"
,
"integrity"
:
"sha512-J5heI+P08I6VJ2Ky3+33IpCdAvlYGTSUjwTPxkAr8i8EoduPMBX2OY/wa3IKZIQl7MU4SbFk8ndgSKyB/cl1zA=="
,
"dependencies"
:
{
"debug"
:
"4.x"
},
"engines"
:
{
"node"
:
">=12.0.0"
}
},
"node_modules/mquery/node_modules/debug"
:
{
"version"
:
"4.3.4"
,
"resolved"
:
"https://registry.npmjs.org/debug/-/debug-4.3.4.tgz"
,
"integrity"
:
"sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ=="
,
"dependencies"
:
{
"ms"
:
"2.1.2"
},
"engines"
:
{
"node"
:
">=6.0"
},
"peerDependenciesMeta"
:
{
"supports-color"
:
{
"optional"
:
true
}
}
},
"node_modules/mquery/node_modules/ms"
:
{
"version"
:
"2.1.2"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
,
"integrity"
:
"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/ms"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
,
...
...
@@ -1481,6 +1684,14 @@
"once"
:
"^1.3.1"
}
},
"node_modules/punycode"
:
{
"version"
:
"2.1.1"
,
"resolved"
:
"https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz"
,
"integrity"
:
"sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
,
"engines"
:
{
"node"
:
">=6"
}
},
"node_modules/pupa"
:
{
"version"
:
"2.1.1"
,
"resolved"
:
"https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz"
,
...
...
@@ -1636,6 +1847,18 @@
"resolved"
:
"https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz"
,
"integrity"
:
"sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/saslprep"
:
{
"version"
:
"1.0.3"
,
"resolved"
:
"https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz"
,
"integrity"
:
"sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag=="
,
"optional"
:
true
,
"dependencies"
:
{
"sparse-bitfield"
:
"^3.0.3"
},
"engines"
:
{
"node"
:
">=6"
}
},
"node_modules/semver"
:
{
"version"
:
"5.7.1"
,
"resolved"
:
"https://registry.npmjs.org/semver/-/semver-5.7.1.tgz"
,
...
...
@@ -1728,11 +1951,47 @@
"url"
:
"https://github.com/sponsors/ljharb"
}
},
"node_modules/sift"
:
{
"version"
:
"16.0.0"
,
"resolved"
:
"https://registry.npmjs.org/sift/-/sift-16.0.0.tgz"
,
"integrity"
:
"sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ=="
},
"node_modules/signal-exit"
:
{
"version"
:
"3.0.7"
,
"resolved"
:
"https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz"
,
"integrity"
:
"sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
},
"node_modules/smart-buffer"
:
{
"version"
:
"4.2.0"
,
"resolved"
:
"https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz"
,
"integrity"
:
"sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="
,
"engines"
:
{
"node"
:
">= 6.0.0"
,
"npm"
:
">= 3.0.0"
}
},
"node_modules/socks"
:
{
"version"
:
"2.6.2"
,
"resolved"
:
"https://registry.npmjs.org/socks/-/socks-2.6.2.tgz"
,
"integrity"
:
"sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA=="
,
"dependencies"
:
{
"ip"
:
"^1.1.5"
,
"smart-buffer"
:
"^4.2.0"
},
"engines"
:
{
"node"
:
">= 10.13.0"
,
"npm"
:
">= 3.0.0"
}
},
"node_modules/sparse-bitfield"
:
{
"version"
:
"3.0.3"
,
"resolved"
:
"https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz"
,
"integrity"
:
"sha1-/0rm5oZWBWuks+eSqzM004JzyhE="
,
"optional"
:
true
,
"dependencies"
:
{
"memory-pager"
:
"^1.0.2"
}
},
"node_modules/spawn-command"
:
{
"version"
:
"0.0.2-1"
,
"resolved"
:
"https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz"
,
...
...
@@ -1827,6 +2086,17 @@
"nodetouch"
:
"bin/nodetouch.js"
}
},
"node_modules/tr46"
:
{
"version"
:
"3.0.0"
,
"resolved"
:
"https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz"
,
"integrity"
:
"sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA=="
,
"dependencies"
:
{
"punycode"
:
"^2.1.1"
},
"engines"
:
{
"node"
:
">=12"
}
},
"node_modules/tree-kill"
:
{
"version"
:
"1.2.2"
,
"resolved"
:
"https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz"
,
...
...
@@ -1963,6 +2233,26 @@
"node"
:
">= 0.8"
}
},
"node_modules/webidl-conversions"
:
{
"version"
:
"7.0.0"
,
"resolved"
:
"https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz"
,
"integrity"
:
"sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="
,
"engines"
:
{
"node"
:
">=12"
}
},
"node_modules/whatwg-url"
:
{
"version"
:
"11.0.0"
,
"resolved"
:
"https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz"
,
"integrity"
:
"sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ=="
,
"dependencies"
:
{
"tr46"
:
"^3.0.0"
,
"webidl-conversions"
:
"^7.0.0"
},
"engines"
:
{
"node"
:
">=12"
}
},
"node_modules/widest-line"
:
{
"version"
:
"3.1.0"
,
"resolved"
:
"https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz"
,
...
...
@@ -2080,6 +2370,20 @@
"resolved"
:
"https://registry.npmjs.org/@types/node/-/node-17.0.36.tgz"
,
"integrity"
:
"sha512-V3orv+ggDsWVHP99K3JlwtH20R7J4IhI1Kksgc+64q5VxgfRkQG8Ws3MFm/FZOKDYGy9feGFlZ70/HpCNe9QaA=="
},
"@types/webidl-conversions"
:
{
"version"
:
"6.1.1"
,
"resolved"
:
"https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz"
,
"integrity"
:
"sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q=="
},
"@types/whatwg-url"
:
{
"version"
:
"8.2.1"
,
"resolved"
:
"https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz"
,
"integrity"
:
"sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ=="
,
"requires"
:
{
"@types/node"
:
"*"
,
"@types/webidl-conversions"
:
"*"
}
},
"abbrev"
:
{
"version"
:
"1.1.1"
,
"resolved"
:
"https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz"
,
...
...
@@ -2148,6 +2452,11 @@
"resolved"
:
"https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz"
,
"integrity"
:
"sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"base64-js"
:
{
"version"
:
"1.5.1"
,
"resolved"
:
"https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz"
,
"integrity"
:
"sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
},
"binary-extensions"
:
{
"version"
:
"2.2.0"
,
"resolved"
:
"https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz"
,
...
...
@@ -2204,6 +2513,23 @@
"fill-range"
:
"^7.0.1"
}
},
"bson"
:
{
"version"
:
"4.6.4"
,
"resolved"
:
"https://registry.npmjs.org/bson/-/bson-4.6.4.tgz"
,
"integrity"
:
"sha512-TdQ3FzguAu5HKPPlr0kYQCyrYUYh8tFM+CMTpxjNzVzxeiJY00Rtuj3LXLHSgiGvmaWlZ8PE+4KyM2thqE38pQ=="
,
"requires"
:
{
"buffer"
:
"^5.6.0"
}
},
"buffer"
:
{
"version"
:
"5.7.1"
,
"resolved"
:
"https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz"
,
"integrity"
:
"sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="
,
"requires"
:
{
"base64-js"
:
"^1.3.1"
,
"ieee754"
:
"^1.1.13"
}
},
"bytes"
:
{
"version"
:
"3.1.2"
,
"resolved"
:
"https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz"
,
...
...
@@ -2453,6 +2779,11 @@
"resolved"
:
"https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz"
,
"integrity"
:
"sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
},
"denque"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/denque/-/denque-2.0.1.tgz"
,
"integrity"
:
"sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ=="
},
"depd"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/depd/-/depd-2.0.0.tgz"
,
...
...
@@ -2752,6 +3083,11 @@
"safer-buffer"
:
">= 2.1.2 < 3"
}
},
"ieee754"
:
{
"version"
:
"1.2.1"
,
"resolved"
:
"https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz"
,
"integrity"
:
"sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
},
"ignore-by-default"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz"
,
...
...
@@ -2777,6 +3113,11 @@
"resolved"
:
"https://registry.npmjs.org/ini/-/ini-2.0.0.tgz"
,
"integrity"
:
"sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA=="
},
"ip"
:
{
"version"
:
"1.1.8"
,
"resolved"
:
"https://registry.npmjs.org/ip/-/ip-1.1.8.tgz"
,
"integrity"
:
"sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg=="
},
"ipaddr.js"
:
{
"version"
:
"1.9.1"
,
"resolved"
:
"https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz"
,
...
...
@@ -2865,6 +3206,11 @@
"resolved"
:
"https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz"
,
"integrity"
:
"sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ=="
},
"kareem"
:
{
"version"
:
"2.3.5"
,
"resolved"
:
"https://registry.npmjs.org/kareem/-/kareem-2.3.5.tgz"
,
"integrity"
:
"sha512-qxCyQtp3ioawkiRNQr/v8xw9KIviMSSNmy+63Wubj7KmMn3g7noRXIZB4vPCAP+ETi2SR8eH6CvmlKZuGpoHOg=="
},
"keyv"
:
{
"version"
:
"3.1.0"
,
"resolved"
:
"https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz"
,
...
...
@@ -2919,6 +3265,12 @@
"resolved"
:
"https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
,
"integrity"
:
"sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"memory-pager"
:
{
"version"
:
"1.5.0"
,
"resolved"
:
"https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz"
,
"integrity"
:
"sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg=="
,
"optional"
:
true
},
"merge-descriptors"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
,
...
...
@@ -2974,6 +3326,76 @@
"resolved"
:
"https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz"
,
"integrity"
:
"sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"mongodb"
:
{
"version"
:
"4.5.0"
,
"resolved"
:
"https://registry.npmjs.org/mongodb/-/mongodb-4.5.0.tgz"
,
"integrity"
:
"sha512-A2l8MjEpKojnhbCM0MK3+UOGUSGvTNNSv7AkP1fsT7tkambrkkqN/5F2y+PhzsV0Nbv58u04TETpkaSEdI2zKA=="
,
"requires"
:
{
"bson"
:
"^4.6.2"
,
"denque"
:
"^2.0.1"
,
"mongodb-connection-string-url"
:
"^2.5.2"
,
"saslprep"
:
"^1.0.3"
,
"socks"
:
"^2.6.2"
}
},
"mongodb-connection-string-url"
:
{
"version"
:
"2.5.2"
,
"resolved"
:
"https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.2.tgz"
,
"integrity"
:
"sha512-tWDyIG8cQlI5k3skB6ywaEA5F9f5OntrKKsT/Lteub2zgwSUlhqEN2inGgBTm8bpYJf8QYBdA/5naz65XDpczA=="
,
"requires"
:
{
"@types/whatwg-url"
:
"^8.2.1"
,
"whatwg-url"
:
"^11.0.0"
}
},
"mongoose"
:
{
"version"
:
"6.3.4"
,
"resolved"
:
"https://registry.npmjs.org/mongoose/-/mongoose-6.3.4.tgz"
,
"integrity"
:
"sha512-UP0azyGMdY+2YNbJUHeHhnVw5vPzCqs4GQDUwHkilif/rwmSZktUQhQWMp1pUgRNeF2JC30vWGLrInZxD7K/Qw=="
,
"requires"
:
{
"bson"
:
"^4.6.2"
,
"kareem"
:
"2.3.5"
,
"mongodb"
:
"4.5.0"
,
"mpath"
:
"0.9.0"
,
"mquery"
:
"4.0.3"
,
"ms"
:
"2.1.3"
,
"sift"
:
"16.0.0"
},
"dependencies"
:
{
"ms"
:
{
"version"
:
"2.1.3"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz"
,
"integrity"
:
"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
}
}
},
"mpath"
:
{
"version"
:
"0.9.0"
,
"resolved"
:
"https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz"
,
"integrity"
:
"sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew=="
},
"mquery"
:
{
"version"
:
"4.0.3"
,
"resolved"
:
"https://registry.npmjs.org/mquery/-/mquery-4.0.3.tgz"
,
"integrity"
:
"sha512-J5heI+P08I6VJ2Ky3+33IpCdAvlYGTSUjwTPxkAr8i8EoduPMBX2OY/wa3IKZIQl7MU4SbFk8ndgSKyB/cl1zA=="
,
"requires"
:
{
"debug"
:
"4.x"
},
"dependencies"
:
{
"debug"
:
{
"version"
:
"4.3.4"
,
"resolved"
:
"https://registry.npmjs.org/debug/-/debug-4.3.4.tgz"
,
"integrity"
:
"sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ=="
,
"requires"
:
{
"ms"
:
"2.1.2"
}
},
"ms"
:
{
"version"
:
"2.1.2"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
,
"integrity"
:
"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"ms"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
,
...
...
@@ -3121,6 +3543,11 @@
"once"
:
"^1.3.1"
}
},
"punycode"
:
{
"version"
:
"2.1.1"
,
"resolved"
:
"https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz"
,
"integrity"
:
"sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"pupa"
:
{
"version"
:
"2.1.1"
,
"resolved"
:
"https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz"
,
...
...
@@ -3231,6 +3658,15 @@
"resolved"
:
"https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz"
,
"integrity"
:
"sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"saslprep"
:
{
"version"
:
"1.0.3"
,
"resolved"
:
"https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz"
,
"integrity"
:
"sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag=="
,
"optional"
:
true
,
"requires"
:
{
"sparse-bitfield"
:
"^3.0.3"
}
},
"semver"
:
{
"version"
:
"5.7.1"
,
"resolved"
:
"https://registry.npmjs.org/semver/-/semver-5.7.1.tgz"
,
...
...
@@ -3309,11 +3745,39 @@
"object-inspect"
:
"^1.9.0"
}
},
"sift"
:
{
"version"
:
"16.0.0"
,
"resolved"
:
"https://registry.npmjs.org/sift/-/sift-16.0.0.tgz"
,
"integrity"
:
"sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ=="
},
"signal-exit"
:
{
"version"
:
"3.0.7"
,
"resolved"
:
"https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz"
,
"integrity"
:
"sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
},
"smart-buffer"
:
{
"version"
:
"4.2.0"
,
"resolved"
:
"https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz"
,
"integrity"
:
"sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="
},
"socks"
:
{
"version"
:
"2.6.2"
,
"resolved"
:
"https://registry.npmjs.org/socks/-/socks-2.6.2.tgz"
,
"integrity"
:
"sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA=="
,
"requires"
:
{
"ip"
:
"^1.1.5"
,
"smart-buffer"
:
"^4.2.0"
}
},
"sparse-bitfield"
:
{
"version"
:
"3.0.3"
,
"resolved"
:
"https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz"
,
"integrity"
:
"sha1-/0rm5oZWBWuks+eSqzM004JzyhE="
,
"optional"
:
true
,
"requires"
:
{
"memory-pager"
:
"^1.0.2"
}
},
"spawn-command"
:
{
"version"
:
"0.0.2-1"
,
"resolved"
:
"https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz"
,
...
...
@@ -3381,6 +3845,14 @@
"nopt"
:
"~1.0.10"
}
},
"tr46"
:
{
"version"
:
"3.0.0"
,
"resolved"
:
"https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz"
,
"integrity"
:
"sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA=="
,
"requires"
:
{
"punycode"
:
"^2.1.1"
}
},
"tree-kill"
:
{
"version"
:
"1.2.2"
,
"resolved"
:
"https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz"
,
...
...
@@ -3480,6 +3952,20 @@
"resolved"
:
"https://registry.npmjs.org/vary/-/vary-1.1.2.tgz"
,
"integrity"
:
"sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
},
"webidl-conversions"
:
{
"version"
:
"7.0.0"
,
"resolved"
:
"https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz"
,
"integrity"
:
"sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="
},
"whatwg-url"
:
{
"version"
:
"11.0.0"
,
"resolved"
:
"https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz"
,
"integrity"
:
"sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ=="
,
"requires"
:
{
"tr46"
:
"^3.0.0"
,
"webidl-conversions"
:
"^7.0.0"
}
},
"widest-line"
:
{
"version"
:
"3.1.0"
,
"resolved"
:
"https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz"
,
...
...
package.json
View file @
c143bf3
{
"scripts"
:
{
"server"
:
"cd server && nodemon server"
,
"client"
:
"cd client && npm start"
,
"client"
:
"cd client && npm start
--port
"
,
"start"
:
"concurrently --kill-others-on-fail
\"
npm run server
\"
\"
npm run client
\"
"
},
"dependencies"
:
{
...
...
@@ -9,6 +9,7 @@
"concurrently"
:
"^7.2.1"
,
"express"
:
"^4.18.1"
,
"http-proxy-middleware"
:
"^2.0.6"
,
"mongoose"
:
"^6.3.4"
,
"nodemon"
:
"^2.0.16"
}
}
...
...
server/Router/api.js
0 → 100644
View file @
c143bf3
const
express
=
require
(
'express'
);
const
router
=
express
.
Router
();
const
mongoose
=
require
(
'mongoose'
)
mongoose
.
connect
(
'mongodb+srv://choieunseok:uA3mhjPcB3DwsuuD@cluster0.2gsua4u.mongodb.net/?retryWrites=true&w=majority'
);
const
db
=
mongoose
.
connection
db
.
on
(
'error'
,
console
.
error
)
db
.
once
(
'open'
,
()
=>
{
console
.
log
(
'Connected to mongodb Server'
)
});
const
dayPostList
=
mongoose
.
Schema
({
date
:
'string'
,
idArray
:
[{
type
:
String
}]
});
const
dayPostListModel
=
mongoose
.
model
(
'dayPostList'
,
dayPostList
);
const
post
=
mongoose
.
Schema
({
date
:
'string'
,
title
:
'string'
,
content
:
'string'
,
password
:
'string'
});
const
postModel
=
mongoose
.
model
(
'post'
,
post
);
// router.get('/api', (req, res) => {
// res.send({ test: "hi" });
// });
router
.
get
(
'/api/getAll'
,
(
req
,
res
)
=>
{
dayPostListModel
.
find
(
function
(
error
,
dayPostLists
)
{
console
.
log
(
'--- Read all ---'
);
if
(
error
)
{
res
.
send
(
error
);
}
else
{
res
.
send
(
dayPostLists
);
}
})
});
router
.
get
(
'/api/testSave'
,
async
(
req
,
res
)
=>
{
var
isFirst
=
false
;
var
testDayPostList
=
await
dayPostListModel
.
findOne
({
date
:
'2022-05-30'
});
if
(
testDayPostList
==
null
){
testDayPostList
=
new
dayPostListModel
({
date
:
'2022-05-30'
,
idArray
:
[]
});
isFirst
=
true
;
}
var
postListArr
=
testDayPostList
.
idArray
;
var
newPost
=
new
postModel
({
date
:
'2022-05-30'
,
title
:
'테스트 제목'
,
age
:
'테스트 내용'
,
password
:
'password'
});
var
newPostData
=
await
newPost
.
save
();
postListArr
.
push
(
newPostData
.
_id
.
toString
());
if
(
isFirst
)
await
testDayPostList
.
save
();
else
await
dayPostListModel
.
updateOne
({
date
:
'2022-05-30'
},{
idArray
:
postListArr
});
res
.
send
(
"test"
);
});
module
.
exports
=
router
;
server/Router/test.js
deleted
100644 → 0
View file @
d215622
const
express
=
require
(
'express'
);
const
router
=
express
.
Router
();
router
.
get
(
'/api'
,
(
req
,
res
)
=>
{
res
.
send
({
test
:
"hi"
});
});
module
.
exports
=
router
;
\ No newline at end of file
server/server.js
View file @
c143bf3
const
express
=
require
(
'express'
);
const
app
=
express
();
const
test
=
require
(
'.//Router/test
'
);
const
api
=
require
(
'./Router/api
'
);
app
.
use
(
'/'
,
test
);
app
.
use
(
'/'
,
api
);
const
port
=
23023
;
app
.
listen
(
port
,
()
=>
{
console
.
log
(
`Listening on port
${
port
}
`
)});
\ No newline at end of file
const
port
=
23023
;
app
.
listen
(
port
,
()
=>
{
console
.
log
(
`Listening on port
${
port
}
`
)
});
\ No newline at end of file
...
...
Please
register
or
login
to post a comment