Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

heroku is giving me Method not allowed

Tags:

Okay, so I've been on this problem for hours now with no idea how to solve this since I'm just a newbie. I was following a UDEMY course titled WEBDEVBOOTCAMP by Colt Steele. On the deployment section, every time I deploy using Heroku, this gives me a "Method not allowed". I've been following Colt's ways from scratch that's why I wonder how come it's like this.

Please help.


Btw, these are the heroku logs that I've been receiving:

2017-08-07T21:45:10.990742+00:00 heroku[web.1]: Starting process with command `npm start` 2017-08-07T21:45:14.881336+00:00 app[web.1]:  2017-08-07T21:45:14.881350+00:00 app[web.1]: > [email protected] start /app 2017-08-07T21:45:14.881352+00:00 app[web.1]:  2017-08-07T21:45:14.881351+00:00 app[web.1]: > node app.js 2017-08-07T21:45:16.594550+00:00 app[web.1]: Warning: connect.session() MemoryStore is not 2017-08-07T21:45:16.594555+00:00 app[web.1]: designed for a production  environment, as it will leak 2017-08-07T21:45:16.594556+00:00 app[web.1]: memory, and will not scale past a single process. 2017-08-07T21:45:16.610398+00:00 app[web.1]: (node:17) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See http://mongoosejs.com/docs/connections.html#use-mongo-client 2017-08-07T21:45:16.612243+00:00 app[web.1]: The Yelp Camp Server is up! 2017-08-07T21:45:16.665653+00:00 app[web.1]: Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials. 2017-08-07T21:45:16.914410+00:00 heroku[web.1]: State changed from starting to up 2017-08-07T21:54:00.075655+00:00 app[api]: Starting process with command `ls` by user [email protected] 2017-08-07T21:54:03.051279+00:00 heroku[run.4055]: Awaiting client 2017-08-07T21:54:03.090885+00:00 heroku[run.4055]: Starting process with command `ls` 2017-08-07T21:54:03.268924+00:00 heroku[run.4055]: State changed from starting to up 2017-08-07T21:54:08.289699+00:00 heroku[run.4055]: Process exited with status 0 2017-08-07T21:54:08.303853+00:00 heroku[run.4055]: State changed from up to complete 2017-08-07T22:16:51.093190+00:00 heroku[web.1]: Idling 2017-08-07T22:16:51.093810+00:00 heroku[web.1]: State changed from up to down 2017-08-07T22:16:52.026960+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2017-08-07T22:16:52.187881+00:00 heroku[web.1]: Process exited with status 143 2017-08-07T22:38:33.000000+00:00 app[api]: Build started by user [email protected] 2017-08-07T22:38:44.152229+00:00 heroku[web.1]: State changed from down to starting 2017-08-07T22:38:43.802847+00:00 app[api]: Deploy 8174904f by user [email protected] 2017-08-07T22:38:43.802847+00:00 app[api]: Release v5 created by user [email protected] 2017-08-07T22:38:33.000000+00:00 app[api]: Build succeeded 2017-08-07T22:38:45.764651+00:00 heroku[web.1]: Starting process with command `npm start` 2017-08-07T22:38:48.251552+00:00 app[web.1]:  2017-08-07T22:38:48.251586+00:00 app[web.1]: > [email protected] start /app 2017-08-07T22:38:48.251586+00:00 app[web.1]: > node app.js 2017-08-07T22:38:48.251587+00:00 app[web.1]:  2017-08-07T22:38:49.001981+00:00 app[web.1]: Warning: connect.session() MemoryStore is not 2017-08-07T22:38:49.001994+00:00 app[web.1]: designed for a production environment, as it will leak 2017-08-07T22:38:49.001995+00:00 app[web.1]: memory, and will not scale past a single process. 2017-08-07T22:38:49.018239+00:00 app[web.1]: (node:17) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See http://mongoosejs.com/docs/connections.html#use-mongo-client 2017-08-07T22:38:49.020061+00:00 app[web.1]: The Yelp Camp Server is up! 2017-08-07T22:38:49.043200+00:00 app[web.1]: Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials. 2017-08-07T22:38:49.214038+00:00 heroku[web.1]: State changed from starting to up 2017-08-07T23:10:56.925104+00:00 heroku[web.1]: Idling 2017-08-07T23:10:56.925706+00:00 heroku[web.1]: State changed from up to down 2017-08-07T23:10:58.007504+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2017-08-07T23:10:58.359969+00:00 heroku[web.1]: Process exited with status 143 2017-08-08T04:47:35.000000+00:00 app[api]: Build started by user [email protected] 2017-08-08T04:47:45.285929+00:00 heroku[web.1]: State changed from down to starting 2017-08-08T04:47:35.000000+00:00 app[api]: Build succeeded 2017-08-08T04:47:45.069248+00:00 app[api]: Release v6 created by user [email protected] 2017-08-08T04:47:45.069248+00:00 app[api]: Deploy f14ef4fc by user [email protected] 2017-08-08T04:47:46.628278+00:00 heroku[web.1]: Starting process with command `npm start` 2017-08-08T04:47:48.774464+00:00 app[web.1]:  2017-08-08T04:47:48.774484+00:00 app[web.1]: > [email protected] start /app 2017-08-08T04:47:48.774485+00:00 app[web.1]: > node app.js 2017-08-08T04:47:48.774486+00:00 app[web.1]:  2017-08-08T04:47:49.444240+00:00 app[web.1]: Warning: connect.session() MemoryStore is not 2017-08-08T04:47:49.444256+00:00 app[web.1]: designed for a production environment, as it will leak 2017-08-08T04:47:49.444256+00:00 app[web.1]: memory, and will not scale past a single process. 2017-08-08T04:47:49.454406+00:00 app[web.1]: (node:17) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See http://mongoosejs.com/docs/connections.html#use-mongo-client 2017-08-08T04:47:49.455893+00:00 app[web.1]: The Yelp Camp Server is up! 2017-08-08T04:47:49.472576+00:00 app[web.1]: Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials. 2017-08-08T04:47:49.919585+00:00 heroku[web.1]: State changed from starting to up 2017-08-08T05:21:42.640479+00:00 heroku[web.1]: Idling 2017-08-08T05:21:42.641117+00:00 heroku[web.1]: State changed from up to down 2017-08-08T05:21:43.112034+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2017-08-08T05:21:43.397138+00:00 heroku[web.1]: Process exited with status 143 2017-08-08T05:35:24.000000+00:00 app[api]: Build started by user [email protected] 2017-08-08T05:35:34.046061+00:00 app[api]: Release v7 created by user [email protected] 2017-08-08T05:35:34.046061+00:00 app[api]: Deploy 52579a31 by user [email protected] 2017-08-08T05:35:34.347211+00:00 heroku[web.1]: State changed from down to starting 2017-08-08T05:35:24.000000+00:00 app[api]: Build succeeded 2017-08-08T05:35:36.040512+00:00 heroku[web.1]: Starting process with command `npm start` 2017-08-08T05:35:38.881422+00:00 app[web.1]:  2017-08-08T05:35:38.881446+00:00 app[web.1]: > [email protected] start /app 2017-08-08T05:35:38.881447+00:00 app[web.1]: > node app.js 2017-08-08T05:35:38.881448+00:00 app[web.1]:  2017-08-08T05:35:39.981312+00:00 heroku[web.1]: State changed from starting to up 2017-08-08T05:35:39.914694+00:00 app[web.1]: Warning: connect.session() MemoryStore is not 2017-08-08T05:35:39.914717+00:00 app[web.1]: designed for a production environment, as it will leak 2017-08-08T05:35:39.914718+00:00 app[web.1]: memory, and will not scale past a single process. 2017-08-08T05:35:39.932988+00:00 app[web.1]: (node:17) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See http://mongoosejs.com/docs/connections.html#use-mongo-client 2017-08-08T05:35:39.935319+00:00 app[web.1]: The Yelp Camp Server is up! 2017-08-08T05:35:39.967512+00:00 app[web.1]: Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials. 2017-08-08T05:49:20.000000+00:00 app[api]: Build started by user [email protected] 2017-08-08T05:49:31.423119+00:00 heroku[web.1]: Restarting 2017-08-08T05:49:31.425641+00:00 heroku[web.1]: State changed from up to starting 2017-08-08T05:49:31.128129+00:00 app[api]: Deploy 98890a0e by user [email protected] 2017-08-08T05:49:31.128129+00:00 app[api]: Release v8 created by user [email protected] 2017-08-08T05:49:32.024642+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2017-08-08T05:49:32.234319+00:00 heroku[web.1]: Process exited with status 143 2017-08-08T05:49:20.000000+00:00 app[api]: Build succeeded 2017-08-08T05:49:33.865572+00:00 heroku[web.1]: Starting process with command `npm start` 2017-08-08T05:49:36.912525+00:00 app[web.1]:  2017-08-08T05:49:36.912549+00:00 app[web.1]: > [email protected] start /app 2017-08-08T05:49:36.912550+00:00 app[web.1]: > node app.js 2017-08-08T05:49:36.912550+00:00 app[web.1]: `enter code here` 2017-08-08T05:49:38.250325+00:00 app[web.1]: Warning: connect.session() MemoryStore is not 2017-08-08T05:49:38.250352+00:00 app[web.1]: designed for a production environment, as it will leak 2017-08-08T05:49:38.250353+00:00 app[web.1]: memory, and will not scale past a single process. 2017-08-08T05:49:38.270747+00:00 app[web.1]: (node:17) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See http://mongoosejs.com/docs/connections.html#use-mongo-client 2017-08-08T05:49:38.273329+00:00 app[web.1]: The Yelp Camp Server is up! 2017-08-08T05:49:38.314596+00:00 app[web.1]: Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials. 2017-08-08T05:49:38.342241+00:00 heroku[web.1]: State changed from starting to up 
like image 236
Kynt Avatar asked Aug 08 '17 07:08

Kynt


1 Answers

From the Q&A on the webdevbootcamp video:

"Make sure you are trying to access the correct link that gets printed to the console. You shouldn't try to load the link which ends with .git since that is just the repository location.

Your link should look like https://your-app-name.herokuapp.com/"

like image 99
Matt Avatar answered Oct 10 '22 06:10

Matt