daydreamer
daydreamer

Reputation: 92119

Can not deploy web-starter nodejs app on Heroku

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

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

What am I doing wrong? Kindly help

Upvotes: 0

Views: 386

Answers (1)

hisener
hisener

Reputation: 1491

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.

Upvotes: 1

Related Questions