I just uploaded my application to heroku, when loading the web app in the web browser, the name of the application in the web browser tab is what i called it on my desktop "rails project", for production how could i change this so that it is a proper name, for example "website name"?
If you want to change the name of your app itself on Heroku's platform, open your terminal and enter the following:
heroku apps:rename newname
If you want to change the title that appears in the browser tab, go to your application.html.erb or whatever your layout file is that contains the html doc type and header and enter the title like this:
<title>My New App Name</title>
If you want to change the domain name that you navigate to in your browser, you'll want to enter this on the command line:
heroku domains:add www.example.com
You'll need to add CNAME records to your DNS file that point to Heroku. Their documentation explains it here:
https://devcenter.heroku.com/articles/custom-domains
This is really so simple step. At least it worked for me.
First of all go to your heroku dashboard and choose the app you want to rename. And there you just rename your application like you want. Accept all of the warnings.
Secondly you go to your .git folder of your app folder and then to the config file and open it in a text editor and at url change your app name exactly how you have renamed your dashboard app and don't delete the last .git. And save it.
Third and finally, you just choose the directory on your terminal and just upload your heroku app like you did earlier.
heroku login
git init
git add.
git commit -m "your message"
git push heroku master
Related
I have watched a demo video how to use one-click Strapi deployment to set up a Strapi API. I follow all the steps in the video and I get no messages until I get the message: "you appear to have cloned an empty repository". This also happens in the video, but the tutor has an empty .git folder in the project folder. He says it is important that this is there but for me there is no .git folder. I am very confused since I do the exact same steps. Anyone had this issue? I can run the Strapi API locally on my machine, but I want to create a page with Netlify that fetches data from the said API and display it on the web for my portfolio. I am right that if I do this locally and not via Heroku I can't display products etc. for a final website?
I need to change one string in translation file over front-end part of the site. Is there a method that can change that(because language files are not part of the database)
You can edit the file in the server (by SSH or uploading with FTP) or you can edit locally, push with Git and pull in the server.
Heroku can display custom maintenance page:
heroku config:set MAINTENANCE_PAGE_URL=http://some_server/my_page.html
This requires presence of some website where the page will be always online.
Could the maintenance page be loaded into Heroku once and forever?
No, since there will be no way for the Heroku router to show it if there is a maintenance problem on Heroku.
The canonical way is to put that page on Amazon S3, or any other provider that can serve static pages.
goto app-> setting -> reveal config vars
add new row
key =MAINTENANCE_PAGE_URL
value = any url u want to open
I have created a simple one-page responsive design demo website that I want to test across all major devices. I want to change my website design on my local machine and then deploy it to Heroku so I can test my website on a public website across multiple devices.
Create new directory
Create index.html in new directory
Create index.php (Prompts Heroku to deploy index.html as a php app) using touch index.php
git init
git add index.php
git add index.html
git commit -m "Your comments..."
heroku create
git push heroku master
Open the url for your new Heroku app and view your static website on any device
To test new changes to your local website, repeat steps 6, 7, 9 and 10.
Advantages: 1) It takes less than a minute to deploy your site on the public web via Heroku; 2) It's free.
I want to use Heroku to host a website that has HTML, CSS and JS files, along with some jpegs and gifs.
I know how to do this with a Rails application, using;
heroku create --stack cedar
It seems that the cedar stack create a repo that is fit for Rails, Java ect apps because the error message is
Heroku push rejected, no Cedar-supported app detected
And when I try to launch the app it just say; Heroku | Welcome to your new app!
Here is a link: http://afternoon-brook-2543.herokuapp.com/
So I want to know how to put some JS, HTML, CSS and images files to host. Perhaps another command may create a simple website stack?
If you saved your root file as index.php then Heroku will detect it as a PHP application - it doesn't need to actually contain PHP code, just been named that.
If you want to send a personal website into Heroku, create an index.php file connected to your website. Launch the app as it was a PHP app. You will be able to launch the app with ease!
Hope this helped!