Express JS app on Heroku shows Application Error - node.js

I am trying to host my Express JS app on Heroku, I have uploaded it on my gitHub repo and associated it with my heroku account. I created the Procfile with content
web: node app.js
But when I go to my application link on Heroku it gives Application Error.
What I am doing wrong? Do I need to give my index.js instead of app.js?

I upgraded my git to 2.3.0 and now the logs are coming in. It seems the issue was that no web dynos were running.
I went in my terminal and did
heroku logs --app myappname
heroku ps:scale web=1 --app myappname
and now the application is working

Related

Can't build node.js app on heroku-- "App not compatible with buildpack", even after buildpack set

I have a node.js app in a git repo that looks like this:
/docs
/server
.gitignore
The actual node app is in the 'server' folder, but both it and the docs are in the git repo seen above.
I went through heroku's instructions for creating an app, and have the heroku cli installed on my laptop.
I went into the server folder of my repo and ran heroku create and made sure there was a new remote for heroku afterward-- there was. I also made sure to run heroku buildpacks:set heroku/nodejs and it did so successfully. (I can see that in my heroku dashboard.)
But when I try git push heroku master I get the error in my post title.
Just for fun, I deleted my app on heroku and this time ran heroku create from the root folder, and not the server one. I also ran heroku buildpacks:set heroku/nodejs again. I double-checked the new heroku app name and remote and tried to push again. Unfortunately I got the same "App not compatible with buildpack" message.
Is all this because my git repo's root folder doesn't have a package.json file? Is there a way I can tell heroku, 'hey, look in the server folder for package.json when you're building'?

Create and deploy app on Heroku from Nodejs app

I have a Node web app that can take commands from users. One command allows the user to do the following:
Create Heroku app
Deploy the app using the code from GitHub
Manually, I can deploy the app using command like "heroku create" and "git push heroku master". I would like to do these steps automatically from a Node app.
You should use Node's Heroku client library:
https://github.com/heroku/node-heroku-client

Heroku deploy notworking

I am having problems with my initial app deployment on Heroku. I've been through both the info in the dev center and Getting Started with Node.js on Heroku. While typing 'heroku open' within the dist directory I get a page that pops up in my browser with the message: Heroku | Welcome to your new app Refer to the documentation if you need help deploying.
Why isn't my site popping up?

node.js app on the heroku platform

I created a simple Node.js app following the tutorial offered by Heroku. When I try to run the command heroku ps:scale worker=1 from within the application folder I get the following error message:
Scaling worker dynos... failed
! Resource not found
Any ideas what the problem may be? I checked my app's dashboard on Heroku and the commit is there and also a Dyno is allocated. The Procfile is identical to the one in the tutorial.
Are you sure you have a worker process defined in your procfile? The node tutorial doesn't have you add one I don't think. Try heroku ps:scale web=1 instead.

how to deploy nodejs on heroku

Hi I developed a small application in nodeJs and angular using the angular-fullstack generator for grunt, following the instruction on: https://npmjs.org/package/generator-angular-fullstack, when I finished the developement run:
3) yo angular-fullstack:deploy heroku
4) cd heroku && git push heroku master
my application now is on heroku and the dynos starts, but when I visit the domain where heroku put my application: http://dollsdresses-gnosis.herokuapp.com/
I can see that some files are missing: main.css, script.js , all I can see is a white page with my favicon, when I use my application on my computer, running: grunt server, it works, so I think there is something that I do not know or do wrong on deploying on heroku.
You may not have added main.css, script.js et al to git, so they are not pushed to Heroku when you run git push heroku master. Make sure to git add them.

Resources