0

I am new to front-end and was trying to fork and follow the steps to deploy the work on Heroku, but it failed. My changes are available here.

The steps I performed as following

  • Forked the repo
  • Created a new branch to deploy changes.
  • Made changes(ref) as described in deploy page for Heroku
  • ran heroku local web
  • Hit http://localhost:5000 as per Heroku's documentation
    enter image description hereI see error on web page saying Cannot GET / (snapshot attached)

My repository is available on GitHub at https://github.com/hhimanshu/web-starter-kit/

What am I doing wrong? Kindly help

3
  • You pushed your "dist" folder, right? (to Heroku, I mean) Commented Mar 25, 2017 at 5:13
  • @hisener, everything is local at the moment Commented Mar 25, 2017 at 8:17
  • I posted an answer, please take a look. Take care. Commented Mar 25, 2017 at 16:22

1 Answer 1

1

Finally, I tested on my local computer. It works fine. I do not see any difference but I'll write the steps I followed. Maybe you will see the difference.

  • forked the repo
  • git clone the repo
  • created a new branch
  • mkdir dist
  • created and copy-pasted dist/package.json and dist/server.js from there.
  • changed the directory dist to dist/public in gulpfile.babel.js
  • runned gulp in root folder
  • npm install in root folder
  • npm install in dist folder
  • first tested with npm start. it's ok on localhost:3000
  • heroku local web in dist folder

And result (github repo):

[WARN] No ENV file found
[WARN] ENOENT: no such file or directory, open 'Procfile'
[OKAY] package.json file found - trying 'npm start'
6:03:42 PM web.1 |  > @ start /home/hisener/Projects/web-starter-kit-heroku/dist
6:03:43 PM web.1 |  > node server.js
6:03:43 PM web.1 |  Server running...

web-starter-kit-heroku-local

I hope it would be helpful.

Sign up to request clarification or add additional context in comments.

4 Comments

Hey, thanks. I checked out your heroku branch and ran npm install in project root and dist folder. When I run npm start, it gives me same Cannot GET /, did I miss anything? or did you miss to checkin some file?
@daydreamer You should also run gulp before npm start.
The latest place where I am stuck now is stackoverflow.com/questions/43039009/…. You may know about this
I've added an answer to your new question. Please do not hesitate upvote and accept the answers. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.