Deploy nodejs app heroku, error on git push - node.js

i am trying to deploy my application to Heroku, but, after have succesfully created the app, when i run in the shell the command
$ git push heroku master
the process doesn't start and after made me waiting some times it returns:
Initializing repositoryReceived disconnect from 50.19.85.132: 10: user closed connection
fatal: The remote end hung up unexpectedly
How can i solve this issue? I tried many ways but it seems i just can't deploy any app! Thank in advance

Related

Unable to connect to heroku psql database using the command heroku pg:psql

I have a backend node.js app setup in Heroku that uses a postgreSQL database. I have connected it to my github repo and can push my code to heroku fine it seems. I have installed the Heroku Postgres add-on, but for some reason I am unable to access the database using the heroku pg:psql command. When I run the command, it just states Connecting to databasename and no error or anything else pops up. Here are my gitbash commands:
olms2#LAPTOP-O3KD6RL5 MINGW64 ~/OneDrive/Desktop/Coding/Springboard/Current VS Code Projects/final-capstone-2-backend (master)
$ heroku addons
Add-on Plan Price State
ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
heroku-postgresql (postgresql-elliptical-01419) hobby-dev free created
ΓööΓöÇ as DATABASE
The table above shows add-ons and the attachments to the current app (freebay-backend) or other apps.
olms2#LAPTOP-O3KD6RL5 MINGW64 ~/OneDrive/Desktop/Coding/Springboard/Current VS Code Projects/final-capstone-2-backend (master)
$ heroku pg:psql
--> Connecting to postgresql-elliptical-01419
On a side note, I have no idea why the heroku addons command shows all that gibberish. I have tried deleting the entire app then reinstalling, but I still get the gibberish and unresponsive heroku pg:psql. I should mention that I created the app and installed the addon on the heroku website interface.
Seems there are a bunch of StackOverflow Answers referencing an error with the pg:psql command, but couldn't find any confronting an issue with the command not responding. Happy to provide more info and would really appreciate any help.

Pushing updated heroku app from local project to heroku master, redis

I need to manually update changes to my heroku master app after deployment from my local project without getting rid of any data that was already there in my last instance. How can I do this (on windows or ubuntu on windows). Thanks!

Meteor deploy on Heroku Error deploying Node

I built a Meteor app, and it runs on my local machine, where I have meteor installed.
I have never deployed an app online, and am trying to put the app on heroku.
I first tried to use buildpack/jordansissel/heroku-buildpack-meteor.git, but I got an error "Meteor requires Node v0.10.41 or later"
I then tried to use buildpack/michaltakac/meteor-buildpack-horse.git but it failed to push because it couldn't unpack Node.
Lastly I've tried kevinseguin/heroku-buildpack-meteor.git but I get lots of warnings about npm depricated http://prntscr.com/bewzak
When I look at the logs it says "Slug compilation failed: failed to compile Node.js app"
I also get Error: MONGO_URL must be set in environment
I don't know enough to understand what the errors are, or how to get my app deployed
Image of errors: http://prntscr.com/bex0av
my goal it to get the site on gr-fireworks.herokuapp.com
I contacted Heroku helpdesk and they said they couldn't help me because the issue was outside the scope of Heroku Support.
I tried to reach out to Snap CI who said they were successful in deploying it, but when I try to type in exactly what they did, I am still getting the error about Node https://snap-ci.com/ankitsri11/Fireworks/branch/master/logs/defaultPipeline/1/Heroku?back_to=build_history
My repository I'm trying to deloy is on git at github.com/jschwarzwalder/Fireworks
From description of your problem I can conclude you need to do 2 things on your app's Heroku dashboard (Settings tab):
Add MONGO_URL environment variable that points to your Mongo DB database. You can create mongo instance on external service or use mLab Heroku addon (it has free plan).
So your environment variables may look like:
Also, you may need to add METER_SETTINGS if you use --settings settings.json and ROOT_URL - URL of you app gr-fireworks.herokuapp.com (is required).
Set this buildpack:
Ensure you have .git at the end of url.
Now you can deploy your app using single command (if you setup Heroku Toolbelt and heroku remote points Heroku's app repository):
$ git push heroku master

Node js Registration App MongoError

I am trying to deploy an authorization application to heroku. I cloned this repository and created a Procfile with the following line: web: node app.js. I manage to upload the application by git push heroku master but when I open it it says "Application Error". The same is with heroku local. I get "Express server listening on port 5000" and then an error "[MongoError: connect ECONNREFUSED 127.0.0.1:27017]
However, when I follow the repository instructions
In a separate shell start the MongoDB daemon.
mongod
From within the node-login directory, start the server.
node app
everything is fine and the app runs.
I would be so thankful for any help!
Unfortunately, in looking at that code repo it is hard coded to connect to a mongo instance running on your local machine. You can see that by opening the account-manager.js. This is why you get that error when pushing to heroku as when the app launches there is no mongo instance running on localhost.
When deploying to heroku, if you want to run mongo you will have to setup a mongo instance with one of their mongo add ons.
Once you do that, you will need to edit this codebase to connect to the mongo instance you signed up for (through addon) vs localhost. When you create an account with one of the providers you should be able to get a connection string and either use that directly in the code or use heroku's config vars.

How to Deploy MEAN stack to my hosted server?

I have a great working website built with MEAN and works great locally.
i wish to deploy it on my server,
but i never deployed a website
other than uploading the files to my website ftp.
Tutorials anyone?
Another good starting point would be Digital Ocean, they offer a one click install MEAN stack, with tutorials. https://www.digitalocean.com/community/tutorials/how-to-use-the-mean-one-click-install-image
I have just deployed my MEAN Stack application on Heroku cloud application environment. The deployment steps are easy.
Steps to deploy:
Your mean stack project structure should be like this. This is very important step. The bottonline is your package.json and server.js should be under your root directory. Have a look at the link to know more about the structure.
Clone your remote repository locally i.e. git clone https://github.com/heroku/node-js-getting-started.git
Go inside the cloned repository e.g. cd node-js-getting-started
Run git add .
Run git commit -m "Sample"
Run Heroku login (It will ask you to press any key and then open up the browser and ask you to click login. After logged in closed the browser instance.
Run heroku create myApp --buildpack heroku/nodejs. Note: Buildpacks are responsible for transforming deployed code into a slug, which can then be executed on a dyno. More information
Run git push heroku master. Your deplyment will start.
Once deployment is done, you will see the complete deployment logs on command prompt terminal
The application is now deployed. Ensure that at least one instance of the app is running: heroku ps:scale web=1
Run heroku open. It will run your deployed instance.
Run heroku logs to view information about your running app. More information
You can find more details visiting following links:
https://devcenter.heroku.com/articles/getting-started-with-nodejs#prepare-the-app
https://devcenter.heroku.com/articles/deploying-nodejs
Start from here...
https://github.com/linnovate/mean#hosting-mean
What operating system do you plan to host it on?

Resources