강의

멘토링

커뮤니티

인프런 커뮤니티 질문&답변

yami654님의 프로필 이미지
yami654

작성한 질문수

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

Fly.io 에 그랩마켓 서버 배포하기

heroku open app이 안됩니다.

작성

·

191

1

open app 눌렀을 때 Application error 가 떠서 heroku logs --tail  했더니 아래와 같이 나옵니다..

처음 설치 할 때 윈도우 64 버전으로 다운받았다가 제대로 설치가 안되서 터미널에 npm install -g heroku 로 설치했는데 이거때문에 에러발생한건 아니겠죠..?

도데체 뭐가 문제일까요,,,ㅜㅜ

2021-08-18T02:39:46.109813+00:00 app[api]: Initial release by user yami654@naver.com

2021-08-18T02:39:46.109813+00:00 app[api]: Release v1 created by user yami654@naver.com

2021-08-18T02:39:46.646946+00:00 app[api]: Release v2 created by user yami654@naver.com

2021-08-18T02:39:46.646946+00:00 app[api]: Enable Logplex by user yami654@naver.com

2021-08-18T03:15:30.000000+00:00 app[api]: Build started by user yami654@naver.com

2021-08-18T03:15:44.946691+00:00 app[api]: Deploy 73698b81 by user yami654@naver.com

2021-08-18T03:15:44.946691+00:00 app[api]: Release v3 created by user yami654@naver.com

2021-08-18T03:15:44.962166+00:00 app[api]: Scaled to web@1:Free by user yami654@naver.com

2021-08-18T03:15:45.000000+00:00 app[api]: Build succeeded

2021-08-18T03:15:46.849567+00:00 heroku[web.1]: Starting process with command `npm start`

2021-08-18T03:15:48.467075+00:00 app[web.1]: npm ERR! missing script: start

2021-08-18T03:15:48.469419+00:00 app[web.1]:

2021-08-18T03:15:48.469575+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:

2021-08-18T03:15:48.469627+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-08-18T03_15_48_467Z-debug.log

2021-08-18T03:15:48.505118+00:00 heroku[web.1]: Process exited with status 1

2021-08-18T03:15:48.569896+00:00 heroku[web.1]: State changed from starting to crashed

2021-08-18T03:15:48.626165+00:00 heroku[web.1]: State changed from crashed to starting

2021-08-18T03:15:50.660116+00:00 heroku[web.1]: Starting process with command `npm start`

2021-08-18T03:15:53.686889+00:00 app[web.1]: npm ERR! missing script: start

2021-08-18T03:15:53.690042+00:00 app[web.1]:

2021-08-18T03:15:53.690189+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:

2021-08-18T03:15:53.690240+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-08-18T03_15_53_687Z-debug.log

2021-08-18T03:15:53.750250+00:00 heroku[web.1]: Process exited with status 1

2021-08-18T03:15:53.806800+00:00 heroku[web.1]: State changed from starting to crashed

2021-08-18T03:16:29.031061+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=9db03a45-a36b-4318-8f1c-f27106a60f71 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:16:29.318859+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=822c4e5d-f54b-4f94-89f7-32de2c363e92 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:16:56.093717+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/products" host=my-market-server.herokuapp.com request_id=5b78920f-2090-4314-ae7b-76f0a34d84ad fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:16:56.351250+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=a4d3e8f6-15df-43dd-bd06-87464aa5d539 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:17:10.310433+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/products" host=my-market-server.herokuapp.com request_id=1784bcf8-71c8-4f54-bd0e-6cedfc7fe220 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:17:10.568669+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=064cf586-4124-466d-a687-89018e88be2e fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:17:11.584852+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=4a4f46cb-4027-4c95-897d-7923853888a3 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:17:12.242006+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=5af7db2f-5506-4685-8fc7-a65c42478e93 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:17:34.661203+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=3d5bd02b-fe36-42c7-bbe1-67d30cc4a880 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:17:34.916719+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=4ae72cb2-4b77-4fed-9159-8085d8cc95de fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:20:43.967959+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=1d0c2380-b329-414e-b949-3b8d785c9515 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:20:44.215550+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=99cc3b7b-59e5-45ce-97bd-2ac3b924c141 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:20:49.191410+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=6dc3421e-14a6-44f5-86cf-83ad5a59ae45 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:20:49.447262+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=1e860558-9de6-4888-84cf-8192907c7a3d fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:21:09.673061+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=b0e60ff5-5d90-4a14-97de-f8966ce51ea2 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:21:09.943346+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=d4fe93be-86ac-4e72-be20-8004fca8998f fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:21:19.188733+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=d8196c34-287a-4261-b7fb-6f83415fe61d fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:21:19.451249+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=c21454e4-2f7e-4b54-af5e-dc37e4b93ecf fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:22:02.934781+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=cc23fbaa-d9c5-45dd-b031-4498bc4984a5 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:22:03.183677+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=5a51c5c7-9378-4ff6-8462-e1109f80a9be fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:22:11.206135+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/products" host=my-market-server.herokuapp.com request_id=cdf37377-c415-49c7-b455-a9b7e9bef1a8 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:22:11.481510+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=3674f067-2568-4c61-addb-89db6da1b8a1 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:28:27.449471+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/products" host=my-market-server.herokuapp.com request_id=8319b96a-4f03-4e29-80d6-a4e4ba98f620 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:28:27.702372+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=90561d74-07c9-4556-8bf8-db1df78da334 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:28:30.321622+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=fe037562-cde6-44cc-bbcc-c6e766cdd463 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:28:30.539718+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=a764b394-361b-49eb-91fa-b50ae9fa0a3b fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:31:50.648306+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=8d02130d-89ad-46c2-8504-a33d575aff06 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:31:50.928533+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=b9d54f96-b322-4b5d-93b0-d2602c130bed fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:32:09.680426+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=7c096e8a-e82f-431f-bbab-d21c2bcc14d3 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:32:09.929380+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=e39fe4e0-24c7-4b6b-925a-c87efa0c73cc fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:32:44.023292+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=574e51bd-1d48-4171-a5b3-3c12685bb274 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:32:44.265175+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=65f2a6fc-a08c-4394-9053-2486522547ff fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:49:55.619602+00:00 heroku[web.1]: State changed from crashed to starting

2021-08-18T03:49:57.908905+00:00 heroku[web.1]: Starting process with command `npm start`

2021-08-18T03:50:00.787895+00:00 app[web.1]: npm ERR! missing script: start

2021-08-18T03:50:00.790751+00:00 app[web.1]:

2021-08-18T03:50:00.790882+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:

2021-08-18T03:50:00.790924+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-08-18T03_50_00_788Z-debug.log

2021-08-18T03:50:00.829962+00:00 heroku[web.1]: Process exited with status 1

2021-08-18T03:50:00.888583+00:00 heroku[web.1]: State changed from starting to crashed

2021-08-18T04:47:22.040630+00:00 heroku[web.1]: State changed from crashed to starting

2021-08-18T04:47:23.938189+00:00 heroku[web.1]: Starting process with command `npm start`

2021-08-18T04:47:26.623231+00:00 app[web.1]: npm ERR! missing script: start

2021-08-18T04:47:26.626063+00:00 app[web.1]:

2021-08-18T04:47:26.626226+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:

2021-08-18T04:47:26.626291+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-08-18T04_47_26_623Z-debug.log

2021-08-18T04:47:26.675330+00:00 heroku[web.1]: Process exited with status 1

2021-08-18T04:47:26.722768+00:00 heroku[web.1]: State changed from starting to crashed

2021-08-18T04:59:27.780512+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=e3d09c20-368a-432f-ad2a-4ab4cdeefcb3 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T04:59:28.020807+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=235b8b0f-70ef-4e0d-8ac0-99907387ee5b fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:08:23.747029+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=da178449-52e5-4082-a741-453df062d347 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:08:24.008404+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=745f1df8-0c2f-40be-b823-ccf29dfe2147 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:08:35.322775+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/products" host=my-market-server.herokuapp.com request_id=2a384ba4-681c-4d24-af5d-f3a6a9e83709 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:08:35.586404+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=f356c249-2d99-457e-b209-5a485dfd927b fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:08:37.845651+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=526c17f1-869e-4523-beb8-143de52220cf fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:08:38.104850+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=6f99647e-f34e-4898-bf32-5913a4d0389b fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:09:03.335905+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=8eaedaf6-3c59-45f5-9f75-674c65c9d163 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:09:03.620787+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=12df17e3-2e22-4d98-ad63-9235025d542f fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:10:08.265191+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=89dd0929-b95e-4585-8469-cd0d33bd55f4 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:10:08.510624+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=9f19c627-a641-435c-81f1-2dfd9c600aef fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:14:04.632877+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=f2f7127e-e289-4e58-82f7-eceab27b4940 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:14:04.951584+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=11236159-5349-43e4-a569-d0b4197b6215 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:21:55.255285+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=8d2a3344-ac03-429f-8357-60c7c0511194 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:21:55.520591+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=6020f0a7-c21f-4e69-bb83-51055bf0ccdc fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:23:53.023775+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=6a3f24b4-6a40-403b-8743-70215a913296 fwd="220.85.237.49" dyno= connect= 

2021-08-18T05:23:53.307851+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=ac6d590c-dbf8-440f-ac59-a5a08a7673c2 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:24:53.686116+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=4e0da5d6-fdb7-4255-94c0-57fb96e51e7a fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

= connect= service= status=503 bytes= protocol=https

" dyno= connect= service= status=503 bytes= protocol=https

= connect= service= status=503 bytes= protocol=https

2021-08-18T05:38:18.019063+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=a2501b48-4edb-45f1-aab9-64b55e1694aa fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:38:18.293382+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=7193d07a-d0b7-4934-9de0-7ca0a240b062 fwd="220.85.237.49" dynoPS C:\Users\MY\Desktop\grab-market-server> heroku login

heroku: Press any key to open up the browser to login or q to exit:

Opening browser to https://cli-auth.heroku.com/auth/cli/browser/c0c09d30-5441-4b6c-ab7d-9a7ed03cd886?requestor=SFMyNTY.g2gDbQAAAA0yMjAuODUuMjM3LjQ5bgYACBfGV3sBYgABUYA.fcSC_jd_88o4pSO6E7ezMk1QwuEK1YvHq8LIyu5eV10

Logging in... done

Logged in as yami654@naver.com

PS C:\Users\MY\Desktop\grab-market-server> heroku --version

PS C:\Users\MY\Desktop\grab-market-server> heroku login

heroku: Press any key to open up the browser to login or q to exit:

Opening browser to https://cli-auth.heroku.com/auth/cli/browser/45023056-1c41-434c-9af7-be4b5b993a88?requestor=SFMyNTY.g2gDbQAAAA0yMjAuODUuMjM3LjQ5bgYAGGHVV3sBYgABUYA.ntqCqu25FaUqvLiv60AsfNmSPZupxHWb7v119xGOz0U

Logging in... done

PS C:\Users\MY\Desktop\grab-market-server> heroku git:clone -a my-market-server

Cloning into 'my-market-server'...

remote: Compressing objects: 100% (4/4), done.

Unpacking objects: 100% (5/5), 837 bytes | 41.00 KiB/s, done.

PS C:\Users\MY\Desktop\grab-market-server> ^C

PS C:\Users\MY\Desktop\grab-market-server> cd my-market-server

PS C:\Users\MY\Desktop\grab-market-server\my-market-server>  git add .

PS C:\Users\MY\Desktop\grab-market-server\my-market-server> git commit -am "make it better"

On branch main

Your branch is up to date with 'heroku/main'.

nothing to commit, working tree clean

PS C:\Users\MY\Desktop\grab-market-server\my-market-server> git push heroku master

error: src refspec master does not match any

error: failed to push some refs to 'https://git.heroku.com/my-market-server.git'

PS C:\Users\MY\Desktop\grab-market-server\my-market-server> git push heroku main  

Everything up-to-date

PS C:\Users\MY\Desktop\grab-market-server\my-market-server> heroku logs --tail

2021-08-18T02:39:46.109813+00:00 app[api]: Initial release by user yami654@naver.com

2021-08-18T02:39:46.109813+00:00 app[api]: Release v1 created by user yami654@naver.com

2021-08-18T02:39:46.646946+00:00 app[api]: Release v2 created by user yami654@naver.com

2021-08-18T02:39:46.646946+00:00 app[api]: Enable Logplex by user yami654@naver.com

2021-08-18T03:15:30.000000+00:00 app[api]: Build started by user yami654@naver.com

2021-08-18T03:15:44.946691+00:00 app[api]: Deploy 73698b81 by user yami654@naver.com

2021-08-18T03:15:44.946691+00:00 app[api]: Release v3 created by user yami654@naver.com

2021-08-18T03:15:44.962166+00:00 app[api]: Scaled to web@1:Free by user yami654@naver.com

2021-08-18T03:15:45.000000+00:00 app[api]: Build succeeded

2021-08-18T03:15:46.849567+00:00 heroku[web.1]: Starting process with command `npm start`

2021-08-18T03:15:48.467075+00:00 app[web.1]: npm ERR! missing script: start

2021-08-18T03:15:48.469419+00:00 app[web.1]:

2021-08-18T03:15:48.469575+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:

2021-08-18T03:15:48.469627+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-08-18T03_15_48_467Z-debug.log

2021-08-18T03:15:48.505118+00:00 heroku[web.1]: Process exited with status 1

2021-08-18T03:15:48.569896+00:00 heroku[web.1]: State changed from starting to crashed

2021-08-18T03:15:48.626165+00:00 heroku[web.1]: State changed from crashed to starting

2021-08-18T03:15:50.660116+00:00 heroku[web.1]: Starting process with command `npm start`

2021-08-18T03:15:53.686889+00:00 app[web.1]: npm ERR! missing script: start

2021-08-18T03:15:53.690042+00:00 app[web.1]:

2021-08-18T03:15:53.690189+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:

2021-08-18T03:15:53.690240+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-08-18T03_15_53_687Z-debug.log

2021-08-18T03:15:53.750250+00:00 heroku[web.1]: Process exited with status 1

2021-08-18T03:15:53.806800+00:00 heroku[web.1]: State changed from starting to crashed

2021-08-18T03:16:29.031061+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=9db03a45-a36b-4318-8f1c-f27106a60f71 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:16:29.318859+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=822c4e5d-f54b-4f94-89f7-32de2c363e92 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:16:56.093717+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/products" host=my-market-server.herokuapp.com request_id=5b78920f-2090-4314-ae7b-76f0a34d84ad fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:16:56.351250+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=a4d3e8f6-15df-43dd-bd06-87464aa5d539 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:17:10.310433+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/products" host=my-market-server.herokuapp.com request_id=1784bcf8-71c8-4f54-bd0e-6cedfc7fe220 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:17:10.568669+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=064cf586-4124-466d-a687-89018e88be2e fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:17:11.584852+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=4a4f46cb-4027-4c95-897d-7923853888a3 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:17:12.242006+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=5af7db2f-5506-4685-8fc7-a65c42478e93 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:17:34.661203+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=3d5bd02b-fe36-42c7-bbe1-67d30cc4a880 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:17:34.916719+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=4ae72cb2-4b77-4fed-9159-8085d8cc95de fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:20:43.967959+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=1d0c2380-b329-414e-b949-3b8d785c9515 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:20:44.215550+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=99cc3b7b-59e5-45ce-97bd-2ac3b924c141 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:20:49.191410+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=6dc3421e-14a6-44f5-86cf-83ad5a59ae45 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:20:49.447262+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=1e860558-9de6-4888-84cf-8192907c7a3d fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:21:09.673061+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=b0e60ff5-5d90-4a14-97de-f8966ce51ea2 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:21:09.943346+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=d4fe93be-86ac-4e72-be20-8004fca8998f fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:21:19.188733+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=d8196c34-287a-4261-b7fb-6f83415fe61d fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:21:19.451249+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=c21454e4-2f7e-4b54-af5e-dc37e4b93ecf fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:22:02.934781+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=cc23fbaa-d9c5-45dd-b031-4498bc4984a5 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:22:03.183677+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=5a51c5c7-9378-4ff6-8462-e1109f80a9be fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:22:11.206135+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/products" host=my-market-server.herokuapp.com request_id=cdf37377-c415-49c7-b455-a9b7e9bef1a8 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:22:11.481510+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=3674f067-2568-4c61-addb-89db6da1b8a1 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:28:27.449471+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/products" host=my-market-server.herokuapp.com request_id=8319b96a-4f03-4e29-80d6-a4e4ba98f620 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:28:27.702372+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=90561d74-07c9-4556-8bf8-db1df78da334 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:28:30.321622+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=fe037562-cde6-44cc-bbcc-c6e766cdd463 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:28:30.539718+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=a764b394-361b-49eb-91fa-b50ae9fa0a3b fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:31:50.648306+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=8d02130d-89ad-46c2-8504-a33d575aff06 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:31:50.928533+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=b9d54f96-b322-4b5d-93b0-d2602c130bed fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:32:09.680426+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=7c096e8a-e82f-431f-bbab-d21c2bcc14d3 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:32:09.929380+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=e39fe4e0-24c7-4b6b-925a-c87efa0c73cc fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:32:44.023292+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=574e51bd-1d48-4171-a5b3-3c12685bb274 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T03:32:44.265175+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=65f2a6fc-a08c-4394-9053-2486522547ff fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T03:49:55.619602+00:00 heroku[web.1]: State changed from crashed to starting

2021-08-18T03:49:57.908905+00:00 heroku[web.1]: Starting process with command `npm start`

2021-08-18T03:50:00.787895+00:00 app[web.1]: npm ERR! missing script: start

2021-08-18T03:50:00.790751+00:00 app[web.1]:

2021-08-18T03:50:00.790882+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:

2021-08-18T03:50:00.790924+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-08-18T03_50_00_788Z-debug.log

2021-08-18T03:50:00.829962+00:00 heroku[web.1]: Process exited with status 1

2021-08-18T03:50:00.888583+00:00 heroku[web.1]: State changed from starting to crashed

2021-08-18T04:47:22.040630+00:00 heroku[web.1]: State changed from crashed to starting

2021-08-18T04:47:23.938189+00:00 heroku[web.1]: Starting process with command `npm start`

2021-08-18T04:47:26.623231+00:00 app[web.1]: npm ERR! missing script: start

2021-08-18T04:47:26.626063+00:00 app[web.1]: 

2021-08-18T04:47:26.626226+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:

2021-08-18T04:47:26.626291+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-08-18T04_47_26_623Z-debug.log

2021-08-18T04:47:26.675330+00:00 heroku[web.1]: Process exited with status 1

2021-08-18T04:47:26.722768+00:00 heroku[web.1]: State changed from starting to crashed

2021-08-18T04:59:27.780512+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=e3d09c20-368a-432f-ad2a-4ab4cdeefcb3 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T04:59:28.020807+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=235b8b0f-70ef-4e0d-8ac0-99907387ee5b fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:08:23.747029+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=da178449-52e5-4082-a741-453df062d347 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:08:24.008404+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=745f1df8-0c2f-40be-b823-ccf29dfe2147 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:08:35.322775+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/products" host=my-market-server.herokuapp.com request_id=2a384ba4-681c-4d24-af5d-f3a6a9e83709 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:08:35.586404+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=f356c249-2d99-457e-b209-5a485dfd927b fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:08:37.845651+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=526c17f1-869e-4523-beb8-143de52220cf fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:08:38.104850+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=6f99647e-f34e-4898-bf32-5913a4d0389b fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:09:03.335905+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=8eaedaf6-3c59-45f5-9f75-674c65c9d163 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:09:03.620787+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=12df17e3-2e22-4d98-ad63-9235025d542f fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:10:08.265191+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=89dd0929-b95e-4585-8469-cd0d33bd55f4 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:10:08.510624+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=9f19c627-a641-435c-81f1-2dfd9c600aef fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:14:04.632877+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=f2f7127e-e289-4e58-82f7-eceab27b4940 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:14:04.951584+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=11236159-5349-43e4-a569-d0b4197b6215 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:21:55.255285+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=8d2a3344-ac03-429f-8357-60c7c0511194 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:21:55.520591+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=6020f0a7-c21f-4e69-bb83-51055bf0ccdc fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:23:53.023775+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=6a3f24b4-6a40-403b-8743-70215a913296 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:23:53.307851+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=ac6d590c-dbf8-440f-ac59-a5a08a7673c2 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:24:53.686116+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=4e0da5d6-fdb7-4255-94c0-57fb96e51e7a fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:24:53.992428+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=b17dc872-d735-43f9-94c1-fde406b2b991 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:26:08.066149+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=21ea3de6-d52a-4f31-be9a-433d7953b886 fwd="220.85.237.49" dyno= connect= 

2021-08-18T05:26:08.302062+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=058de701-f1dd-4b42-bc4b-6fba3313681b fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:38:18.019063+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=a2501b48-4edb-45f1-aab9-64b55e1694aa fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:38:18.293382+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=7193d07a-d0b7-4934-9de0-7ca0a240b062 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:42:40.415504+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=5a65d433-410f-494d-9b29-63dfec32d251 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:42:40.683371+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=6f924e14-8a1f-4e77-b940-ced907185378 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

2021-08-18T05:58:25.254701+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=my-market-server.herokuapp.com request_id=c91b4d47-9199-4767-a1ea-451e7bf35bc5 fwd="220.85.237.49" dyno= connect= 

service= status=503 bytes= protocol=https

2021-08-18T05:58:25.534788+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-market-server.herokuapp.com request_id=c624ef72-68af-490f-8d27-8fd34469d9d2 fwd="220.85.237.49" dyno= connect= service= status=503 bytes= protocol=https

아래는 index.js 코드인데 올려주신 소스코드와 비교해봤을 때 틀린곳은 없어보였는데 놓친부분이 있을까요..?

const express = require("express");
const cors = require("cors");
const app = express();
const models = require("./models");
const multer = require("multer");
const upload = multer({
  storage: multer.diskStorage({
    destination: function (req, file, cb) {
      cb(null, "uploads/");
    },
    filename: function (req, file, cb) {
      cb(null, file.originalname);
    },
  }),
});
const port = process.env.PORT || 8080;

app.use(express.json());
app.use(cors());
app.use("/uploads", express.static("uploads"));

app.get("/banners", (req, res) => {
  models.Banner.findAll({
    limit: 2,
  })
    .then((result) => {
      res.send({
        banners: result,
      });
    })
    .catch((error) => {
      console.error(error);
      res.status(500).send("에러가 발생했습니다.");
    });
});

app.get("/products", (req, res) => {
  models.Product.findAll({
    order: [["createdAt", "DESC"]],
    attributes: [
      "id",
      "name",
      "price",
      "createdAt",
      "seller",
      "imageUrl",
      "soldout",
    ],
  })
    .then((result) => {
      console.log("PRODUCTS: ", result);
      res.send({
        products: result,
      });
    })
    .catch((error) => {
      console.error(error);
      res.status(400).send("에러 발생");
    });
});

app.post("/products", (req, res) => {
  const body = req.body;
  const { name, description, price, seller, imageUrl } = body;
  if (!name || !description || !price || !seller || !imageUrl) {
    res.status(400).send("모든필드를 입력해주세요.");
  }
  models.Product.create({ description, price, seller, imageUrl, name })
    .then((result) => {
      console.log("상품 생성 결과 : ", result);
      res.send({
        result,
      });
    })
    .catch((error) => {
      console.error(error);
      res.status(400).send("상품 업로드에 문제가 발생했습니다.");
    });
});

app.get("/products/:id", (req, res) => {
  const params = req.params;
  const { id } = params;
  models.Product.findOne({
    where: {
      id: id,
    },
  })
    .then((result) => {
      console.log("PRODUCTS :", result);
      res.send({
        product: result,
      });
    })
    .catch((error) => {
      console.error(error);
      return res.status(400).send("상품 조회에 에러가 발생했습니다.");
    });
});

app.post("/image", upload.single("image"), (req, res) => {
  const file = req.file;
  console.log(file);
  res.send({
    imageUrl: file.path,
  });
});

app.post("/purchase/:id", (req, res) => {
  const { id } = req.params;
  models.Product.update(
    {
      soldout: 1,
    },
    {
      where: {
        id,
      },
    }
  )
    .then((reuslt) => {
      res.send({
        result: true,
      });
    })
    .catch((error) => {
      res.status(500).send("에러가 발생했습니다.");
    });
});

app.listen(port, () => {
  console.log("그랩의 쇼핑몰 서버가 돌아가고 있습니다.");
  models.sequelize
    .sync()
    .then(() => {
      console.log("DB 연결 성공!");
    })
    .catch((error) => {
      console.error(err);
      console.log("DB 연결 에러");
      process.exit();
    });
});

답변 2

0

그랩님의 프로필 이미지
그랩
지식공유자

로그가 너무 많아서 어떤 문제인지 잘 구분이 가지 않네요.

순서대로 명령어를 쳐보시고, 안되는 부분을 보여주시면 더 빠르게 문제를 찾을 수 있을 것 같습니다. 

0

그랩님의 프로필 이미지
그랩
지식공유자

에러 내용을 보면 아래와 같은 내용이 보입니다!

"npm ERR! missing script: start"

package.json에 scripts에 start가 제대로 들어있는지 확인해보시겠어요~?

강의는 08분 16초 정도부터 보시면 됩니다 :)

yami654님의 프로필 이미지
yami654

작성한 질문수

질문하기