Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hw87AlenBolatov
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Болатов Ален
hw87AlenBolatov
Commits
96aa4852
Commit
96aa4852
authored
Mar 14, 2023
by
Болатов Ален
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1
connected mangoose and added artist model
parent
80fe2db2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
516 additions
and
4 deletions
+516
-4
.env
backend/.env
+2
-0
package-lock.json
backend/package-lock.json
+440
-1
package.json
backend/package.json
+6
-2
index.ts
backend/src/index.ts
+11
-1
artist.ts
backend/src/routes/artist.ts
+47
-0
environment.d.ts
backend/src/types/environment.d.ts
+10
-0
No files found.
backend/.env
0 → 100644
View file @
96aa4852
MONGO_URL='mongodb://localhost:27017'
PORT='3000'
\ No newline at end of file
backend/package-lock.json
View file @
96aa4852
...
...
@@ -9,11 +9,15 @@
"version"
:
"1.0.0"
,
"license"
:
"ISC"
,
"dependencies"
:
{
"@types/node"
:
"^18.15.3"
,
"dotenv"
:
"^16.0.3"
,
"express"
:
"^4.18.2"
,
"mongoose"
:
"^7.0.1"
,
"ts-node-dev"
:
"^2.0.0"
},
"devDependencies"
:
{
"@types/express"
:
"^4.17.17"
"@types/express"
:
"^4.17.17"
,
"@types/mongoose"
:
"^5.11.97"
}
},
"node_modules/@cspotcode/source-map-support"
:
{
...
...
@@ -117,6 +121,16 @@
"integrity"
:
"sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA=="
,
"dev"
:
true
},
"node_modules/@types/mongoose"
:
{
"version"
:
"5.11.97"
,
"resolved"
:
"https://registry.npmjs.org/@types/mongoose/-/mongoose-5.11.97.tgz"
,
"integrity"
:
"sha512-cqwOVYT3qXyLiGw7ueU2kX9noE8DPGRY6z8eUxudhXY8NZ7DMKYAxyZkLSevGfhCX3dO/AoX5/SO9lAzfjon0Q=="
,
"deprecated"
:
"Mongoose publishes its own types, so you do not need to install this package."
,
"dev"
:
true
,
"dependencies"
:
{
"mongoose"
:
"*"
}
},
"node_modules/@types/node"
:
{
"version"
:
"18.15.3"
,
"resolved"
:
"https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz"
,
...
...
@@ -154,6 +168,20 @@
"resolved"
:
"https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz"
,
"integrity"
:
"sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ=="
},
"node_modules/@types/webidl-conversions"
:
{
"version"
:
"7.0.0"
,
"resolved"
:
"https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz"
,
"integrity"
:
"sha512-xTE1E+YF4aWPJJeUzaZI5DRntlkY3+BCVJi0axFptnjGmAoWxkyREIh/XMrfxVLejwQxMCfDXdICo0VLxThrog=="
},
"node_modules/@types/whatwg-url"
:
{
"version"
:
"8.2.2"
,
"resolved"
:
"https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz"
,
"integrity"
:
"sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA=="
,
"dependencies"
:
{
"@types/node"
:
"*"
,
"@types/webidl-conversions"
:
"*"
}
},
"node_modules/accepts"
:
{
"version"
:
"1.3.8"
,
"resolved"
:
"https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz"
,
...
...
@@ -263,6 +291,14 @@
"node"
:
">=8"
}
},
"node_modules/bson"
:
{
"version"
:
"5.0.1"
,
"resolved"
:
"https://registry.npmjs.org/bson/-/bson-5.0.1.tgz"
,
"integrity"
:
"sha512-y09gBGusgHtinMon/GVbv1J6FrXhnr/+6hqLlSmEFzkz6PodqF6TxjyvfvY3AfO+oG1mgUtbC86xSbOlwvM62Q=="
,
"engines"
:
{
"node"
:
">=14.20.1"
}
},
"node_modules/buffer-from"
:
{
"version"
:
"1.1.2"
,
"resolved"
:
"https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz"
,
...
...
@@ -389,6 +425,14 @@
"node"
:
">=0.3.1"
}
},
"node_modules/dotenv"
:
{
"version"
:
"16.0.3"
,
"resolved"
:
"https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz"
,
"integrity"
:
"sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ=="
,
"engines"
:
{
"node"
:
">=12"
}
},
"node_modules/dynamic-dedupe"
:
{
"version"
:
"0.3.0"
,
"resolved"
:
"https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz"
,
...
...
@@ -636,6 +680,11 @@
"resolved"
:
"https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz"
,
"integrity"
:
"sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"node_modules/ip"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/ip/-/ip-2.0.0.tgz"
,
"integrity"
:
"sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ=="
},
"node_modules/ipaddr.js"
:
{
"version"
:
"1.9.1"
,
"resolved"
:
"https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz"
,
...
...
@@ -693,6 +742,14 @@
"node"
:
">=0.12.0"
}
},
"node_modules/kareem"
:
{
"version"
:
"2.5.1"
,
"resolved"
:
"https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz"
,
"integrity"
:
"sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA=="
,
"engines"
:
{
"node"
:
">=12.0.0"
}
},
"node_modules/make-error"
:
{
"version"
:
"1.3.6"
,
"resolved"
:
"https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz"
,
...
...
@@ -706,6 +763,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"
,
...
...
@@ -779,6 +842,113 @@
"node"
:
">=10"
}
},
"node_modules/mongodb"
:
{
"version"
:
"5.1.0"
,
"resolved"
:
"https://registry.npmjs.org/mongodb/-/mongodb-5.1.0.tgz"
,
"integrity"
:
"sha512-qgKb7y+EI90y4weY3z5+lIgm8wmexbonz0GalHkSElQXVKtRuwqXuhXKccyvIjXCJVy9qPV82zsinY0W1FBnJw=="
,
"dependencies"
:
{
"bson"
:
"^5.0.1"
,
"mongodb-connection-string-url"
:
"^2.6.0"
,
"socks"
:
"^2.7.1"
},
"engines"
:
{
"node"
:
">=14.20.1"
},
"optionalDependencies"
:
{
"saslprep"
:
"^1.0.3"
},
"peerDependencies"
:
{
"@aws-sdk/credential-providers"
:
"^3.201.0"
,
"mongodb-client-encryption"
:
"^2.3.0"
,
"snappy"
:
"^7.2.2"
},
"peerDependenciesMeta"
:
{
"@aws-sdk/credential-providers"
:
{
"optional"
:
true
},
"mongodb-client-encryption"
:
{
"optional"
:
true
},
"snappy"
:
{
"optional"
:
true
}
}
},
"node_modules/mongodb-connection-string-url"
:
{
"version"
:
"2.6.0"
,
"resolved"
:
"https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz"
,
"integrity"
:
"sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ=="
,
"dependencies"
:
{
"@types/whatwg-url"
:
"^8.2.1"
,
"whatwg-url"
:
"^11.0.0"
}
},
"node_modules/mongoose"
:
{
"version"
:
"7.0.1"
,
"resolved"
:
"https://registry.npmjs.org/mongoose/-/mongoose-7.0.1.tgz"
,
"integrity"
:
"sha512-fxm2bPRG457Hb8RLwN8cMCokK8HNem/7g+qp5SrHC7Pt4Z4jqn1+/3cuc8W7uqehKDWEtpirggI7uw08x2ZIjQ=="
,
"dependencies"
:
{
"bson"
:
"^5.0.1"
,
"kareem"
:
"2.5.1"
,
"mongodb"
:
"5.1.0"
,
"mpath"
:
"0.9.0"
,
"mquery"
:
"5.0.0"
,
"ms"
:
"2.1.3"
,
"sift"
:
"16.0.1"
},
"engines"
:
{
"node"
:
">=14.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"
:
"5.0.0"
,
"resolved"
:
"https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz"
,
"integrity"
:
"sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg=="
,
"dependencies"
:
{
"debug"
:
"4.x"
},
"engines"
:
{
"node"
:
">=14.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"
,
...
...
@@ -876,6 +1046,14 @@
"node"
:
">= 0.10"
}
},
"node_modules/punycode"
:
{
"version"
:
"2.3.0"
,
"resolved"
:
"https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz"
,
"integrity"
:
"sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA=="
,
"engines"
:
{
"node"
:
">=6"
}
},
"node_modules/qs"
:
{
"version"
:
"6.11.0"
,
"resolved"
:
"https://registry.npmjs.org/qs/-/qs-6.11.0.tgz"
,
...
...
@@ -974,6 +1152,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/send"
:
{
"version"
:
"0.18.0"
,
"resolved"
:
"https://registry.npmjs.org/send/-/send-0.18.0.tgz"
,
...
...
@@ -1034,6 +1224,33 @@
"url"
:
"https://github.com/sponsors/ljharb"
}
},
"node_modules/sift"
:
{
"version"
:
"16.0.1"
,
"resolved"
:
"https://registry.npmjs.org/sift/-/sift-16.0.1.tgz"
,
"integrity"
:
"sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ=="
},
"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.7.1"
,
"resolved"
:
"https://registry.npmjs.org/socks/-/socks-2.7.1.tgz"
,
"integrity"
:
"sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ=="
,
"dependencies"
:
{
"ip"
:
"^2.0.0"
,
"smart-buffer"
:
"^4.2.0"
},
"engines"
:
{
"node"
:
">= 10.13.0"
,
"npm"
:
">= 3.0.0"
}
},
"node_modules/source-map"
:
{
"version"
:
"0.6.1"
,
"resolved"
:
"https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
,
...
...
@@ -1051,6 +1268,15 @@
"source-map"
:
"^0.6.0"
}
},
"node_modules/sparse-bitfield"
:
{
"version"
:
"3.0.3"
,
"resolved"
:
"https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz"
,
"integrity"
:
"sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ=="
,
"optional"
:
true
,
"dependencies"
:
{
"memory-pager"
:
"^1.0.2"
}
},
"node_modules/statuses"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz"
,
...
...
@@ -1105,6 +1331,17 @@
"node"
:
">=0.6"
}
},
"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"
,
...
...
@@ -1253,6 +1490,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/wrappy"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
,
...
...
@@ -1371,6 +1628,15 @@
"integrity"
:
"sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA=="
,
"dev"
:
true
},
"@types/mongoose"
:
{
"version"
:
"5.11.97"
,
"resolved"
:
"https://registry.npmjs.org/@types/mongoose/-/mongoose-5.11.97.tgz"
,
"integrity"
:
"sha512-cqwOVYT3qXyLiGw7ueU2kX9noE8DPGRY6z8eUxudhXY8NZ7DMKYAxyZkLSevGfhCX3dO/AoX5/SO9lAzfjon0Q=="
,
"dev"
:
true
,
"requires"
:
{
"mongoose"
:
"*"
}
},
"@types/node"
:
{
"version"
:
"18.15.3"
,
"resolved"
:
"https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz"
,
...
...
@@ -1408,6 +1674,20 @@
"resolved"
:
"https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz"
,
"integrity"
:
"sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ=="
},
"@types/webidl-conversions"
:
{
"version"
:
"7.0.0"
,
"resolved"
:
"https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz"
,
"integrity"
:
"sha512-xTE1E+YF4aWPJJeUzaZI5DRntlkY3+BCVJi0axFptnjGmAoWxkyREIh/XMrfxVLejwQxMCfDXdICo0VLxThrog=="
},
"@types/whatwg-url"
:
{
"version"
:
"8.2.2"
,
"resolved"
:
"https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz"
,
"integrity"
:
"sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA=="
,
"requires"
:
{
"@types/node"
:
"*"
,
"@types/webidl-conversions"
:
"*"
}
},
"accepts"
:
{
"version"
:
"1.3.8"
,
"resolved"
:
"https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz"
,
...
...
@@ -1492,6 +1772,11 @@
"fill-range"
:
"^7.0.1"
}
},
"bson"
:
{
"version"
:
"5.0.1"
,
"resolved"
:
"https://registry.npmjs.org/bson/-/bson-5.0.1.tgz"
,
"integrity"
:
"sha512-y09gBGusgHtinMon/GVbv1J6FrXhnr/+6hqLlSmEFzkz6PodqF6TxjyvfvY3AfO+oG1mgUtbC86xSbOlwvM62Q=="
},
"buffer-from"
:
{
"version"
:
"1.1.2"
,
"resolved"
:
"https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz"
,
...
...
@@ -1582,6 +1867,11 @@
"resolved"
:
"https://registry.npmjs.org/diff/-/diff-4.0.2.tgz"
,
"integrity"
:
"sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A=="
},
"dotenv"
:
{
"version"
:
"16.0.3"
,
"resolved"
:
"https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz"
,
"integrity"
:
"sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ=="
},
"dynamic-dedupe"
:
{
"version"
:
"0.3.0"
,
"resolved"
:
"https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz"
,
...
...
@@ -1774,6 +2064,11 @@
"resolved"
:
"https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz"
,
"integrity"
:
"sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"ip"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/ip/-/ip-2.0.0.tgz"
,
"integrity"
:
"sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ=="
},
"ipaddr.js"
:
{
"version"
:
"1.9.1"
,
"resolved"
:
"https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz"
,
...
...
@@ -1813,6 +2108,11 @@
"resolved"
:
"https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz"
,
"integrity"
:
"sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
},
"kareem"
:
{
"version"
:
"2.5.1"
,
"resolved"
:
"https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz"
,
"integrity"
:
"sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA=="
},
"make-error"
:
{
"version"
:
"1.3.6"
,
"resolved"
:
"https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz"
,
...
...
@@ -1823,6 +2123,12 @@
"resolved"
:
"https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
,
"integrity"
:
"sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ=="
},
"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"
,
...
...
@@ -1869,6 +2175,75 @@
"resolved"
:
"https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz"
,
"integrity"
:
"sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
},
"mongodb"
:
{
"version"
:
"5.1.0"
,
"resolved"
:
"https://registry.npmjs.org/mongodb/-/mongodb-5.1.0.tgz"
,
"integrity"
:
"sha512-qgKb7y+EI90y4weY3z5+lIgm8wmexbonz0GalHkSElQXVKtRuwqXuhXKccyvIjXCJVy9qPV82zsinY0W1FBnJw=="
,
"requires"
:
{
"bson"
:
"^5.0.1"
,
"mongodb-connection-string-url"
:
"^2.6.0"
,
"saslprep"
:
"^1.0.3"
,
"socks"
:
"^2.7.1"
}
},
"mongodb-connection-string-url"
:
{
"version"
:
"2.6.0"
,
"resolved"
:
"https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz"
,
"integrity"
:
"sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ=="
,
"requires"
:
{
"@types/whatwg-url"
:
"^8.2.1"
,
"whatwg-url"
:
"^11.0.0"
}
},
"mongoose"
:
{
"version"
:
"7.0.1"
,
"resolved"
:
"https://registry.npmjs.org/mongoose/-/mongoose-7.0.1.tgz"
,
"integrity"
:
"sha512-fxm2bPRG457Hb8RLwN8cMCokK8HNem/7g+qp5SrHC7Pt4Z4jqn1+/3cuc8W7uqehKDWEtpirggI7uw08x2ZIjQ=="
,
"requires"
:
{
"bson"
:
"^5.0.1"
,
"kareem"
:
"2.5.1"
,
"mongodb"
:
"5.1.0"
,
"mpath"
:
"0.9.0"
,
"mquery"
:
"5.0.0"
,
"ms"
:
"2.1.3"
,
"sift"
:
"16.0.1"
},
"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"
:
"5.0.0"
,
"resolved"
:
"https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz"
,
"integrity"
:
"sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg=="
,
"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"
,
...
...
@@ -1939,6 +2314,11 @@
"ipaddr.js"
:
"1.9.1"
}
},
"punycode"
:
{
"version"
:
"2.3.0"
,
"resolved"
:
"https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz"
,
"integrity"
:
"sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA=="
},
"qs"
:
{
"version"
:
"6.11.0"
,
"resolved"
:
"https://registry.npmjs.org/qs/-/qs-6.11.0.tgz"
,
...
...
@@ -1999,6 +2379,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"
}
},
"send"
:
{
"version"
:
"0.18.0"
,
"resolved"
:
"https://registry.npmjs.org/send/-/send-0.18.0.tgz"
,
...
...
@@ -2052,6 +2441,25 @@
"object-inspect"
:
"^1.9.0"
}
},
"sift"
:
{
"version"
:
"16.0.1"
,
"resolved"
:
"https://registry.npmjs.org/sift/-/sift-16.0.1.tgz"
,
"integrity"
:
"sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ=="
},
"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.7.1"
,
"resolved"
:
"https://registry.npmjs.org/socks/-/socks-2.7.1.tgz"
,
"integrity"
:
"sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ=="
,
"requires"
:
{
"ip"
:
"^2.0.0"
,
"smart-buffer"
:
"^4.2.0"
}
},
"source-map"
:
{
"version"
:
"0.6.1"
,
"resolved"
:
"https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
,
...
...
@@ -2066,6 +2474,15 @@
"source-map"
:
"^0.6.0"
}
},
"sparse-bitfield"
:
{
"version"
:
"3.0.3"
,
"resolved"
:
"https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz"
,
"integrity"
:
"sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ=="
,
"optional"
:
true
,
"requires"
:
{
"memory-pager"
:
"^1.0.2"
}
},
"statuses"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz"
,
...
...
@@ -2099,6 +2516,14 @@
"resolved"
:
"https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz"
,
"integrity"
:
"sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
},
"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"
,
...
...
@@ -2187,6 +2612,20 @@
"resolved"
:
"https://registry.npmjs.org/vary/-/vary-1.1.2.tgz"
,
"integrity"
:
"sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
},
"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"
}
},
"wrappy"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
,
...
...
backend/package.json
View file @
96aa4852
...
...
@@ -10,10 +10,14 @@
"author"
:
""
,
"license"
:
"ISC"
,
"dependencies"
:
{
"@types/node"
:
"^18.15.3"
,
"dotenv"
:
"^16.0.3"
,
"express"
:
"^4.18.2"
,
"mongoose"
:
"^7.0.1"
,
"ts-node-dev"
:
"^2.0.0"
},
"devDependencies"
:
{
"@types/express"
:
"^4.17.17"
"@types/express"
:
"^4.17.17"
,
"@types/mongoose"
:
"^5.11.97"
}
}
\ No newline at end of file
}
backend/src/index.ts
View file @
96aa4852
import
express
,
{
Express
}
from
'express'
;
import
express
,
{
Express
,
json
}
from
'express'
;
import
mongoose
from
'mongoose'
;
import
'dotenv/config'
;
import
{
artistRouter
}
from
'./routes/artist'
;
const
app
:
Express
=
express
();
app
.
use
(
json
());
app
.
use
(
'/artists'
,
artistRouter
);
app
.
listen
(
process
.
env
.
PORT
,
()
=>
{
console
.
log
(
'Server started on port '
+
process
.
env
.
PORT
);
});
backend/src/routes/artist.ts
0 → 100644
View file @
96aa4852
import
express
,
{
Request
,
Response
}
from
'express'
;
import
{
model
,
Schema
,
connect
,
Document
,
HydratedDocument
}
from
'mongoose'
;
const
router
=
express
.
Router
();
interface
IArtist
{
name
:
string
;
image
?:
File
;
description
:
string
;
}
const
artistSchema
=
new
Schema
<
IArtist
>
({
name
:
{
type
:
String
,
required
:
true
,
},
image
:
{
type
:
Buffer
,
},
description
:
{
type
:
String
,
required
:
true
,
},
});
const
Artist
=
model
<
IArtist
>
(
'Artist'
,
artistSchema
);
const
run
=
async
()
=>
{
await
connect
(
`
${
process
.
env
.
MONGO_URL
}
/artist`
);
};
run
().
catch
((
err
)
=>
console
.
log
(
err
));
router
.
get
(
'/'
,
(
req
:
Request
,
res
:
Response
)
=>
{
return
res
.
send
(
'Hello'
);
});
router
.
post
(
'/'
,
async
(
req
:
Request
,
res
:
Response
)
=>
{
const
artist
:
HydratedDocument
<
IArtist
>
=
new
Artist
({
name
:
req
.
body
.
name
,
description
:
req
.
body
.
description
,
});
await
artist
.
save
();
res
.
send
(
artist
);
});
export
{
router
as
artistRouter
};
backend/src/types/environment.d.ts
0 → 100644
View file @
96aa4852
declare
global
{
namespace
NodeJS
{
interface
ProcessEnv
{
PORT
:
string
;
MONGO_URL
:
string
;
}
}
}
export
{};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment