Sapper project works on netlify but doesn't work on cloudflare - build

I built a sapper project and it worked fine on localhost and netlify, but when I tried to deploy it on cloudflare, 2 pages were missing. This was in the log file.
(500) team-comps/index.html
(500) champions/index.html
The other pages work fine.
I used npx sapper export to export the project
and /__sapper__/export as output director
It is the same as in the netlify deploy settings.

Related

Hosting svelte-kit on aws amplify

I’ve been trying to deploy my svelte-kit project to aws amplify but whenever I do, despite the build and deploy stages being successful, the page returns a 404 error. I’ve changed the build settings to '/build' which is the output directory I've specified, and I'm using svelte-js/adapter-node but have tried a few other adapters. When I download the build artifacts from aws the build is the exact same as what is produced locally (by npm run build).
Build Log Image
Amplify Domain returns: "No web page was found for the web address:"
I've attatched an image of the end of the amplify build, which includes the warning 'no index.html found' as svelte-kit doesn't seem to produce an index.html. Does anyone know how to fix this issue? Anyway to deploy a dynamic svelte project to amplify is what I'm looking for.
I flipped over to using adapter-static (and svelte kit) and it seems to work for me.

Heroku set default site

I have created a new Heroku site and I am developing it on my Linux box, using Django. The standard "getting started" site Heroku created for me is called "gettingstarted". How can I change that / configure Heroku to forget about it?
I was reading through the Django tutorial, which explains how to create a new site (django-admin startproject my_site). I did this successfully for a demo project. Then I tried to do it under the Heroku directory, because I wanted a better name for my site than "gettingstarted". I noticed that every time I start the Heroku server under my project, it says ...using settings 'gettingstarted.settings'. I found that this is configured in manage.py and I change it.
This is the directory layout I have
/some/path/heroku_random_name/gettingstarted/settings.py
/some/path/heroku_random_name/my_site/settings.py
/some/path/heroku_random_name/my_app
This is what I have in
/some/path/heroku_random_name/manage.py
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'my_site.settings')
so I would expect that the site that matters is my_site.
I got it to the point where I can run the site successfully on my local machine, and I can tell that it using the settings from my_site. But when I deploy the project to Heroku, it does not recognize my_app until I register it in gettingstarted/settings.py. In other words, when running in Heroku, it is still using gettingstarted as the site to run.
I am new to all this, so I left gettingstarted in the project, because I am afraid to break things. But how can I configure Heroku to execute settings from my_site and not from gettingstarted?
Found it: it's configured in Procfile.
It's confusing because it's configured in one place for running locally and in a different place for running hosted at Heroku.

AWS Amplify deployment: ERR_CONNECTION_RESET

I'm deploying my first project to AWS Amplify, it's just a basic React app with some divs and text to test out the deployment.
It builds and runs in VS code and is bound to Git.
I ran thorough the Amplify Console wizard, setting up the build to use Webpack which completed successfully and deployed uploading:
index.html
index.css
main.js
and a couple of images
However when I visit the link I get:
This site can’t be reached
ERR_CONNECTION_RESET
How can I investigate what exactly has been deployed to give me clues to why it won't work?
I has assumed that it was the hosting that was the problem but after testing it with Firefox and IE I got more security related messages.
Finally I got it working on my phone on 4G (bypassing the home router) and this worked.

Angular 6 Prod build running blank page after upgrading from Angular 5

My team's Angular app was using Angular 5 and production builds to our django app worked perfectly fine. However, after we upgraded to Angular 6, we can no longer run ng build properly. We our Output directory is our django app's static files, where Django can reference the bundle. the django app starts up, spits out no console errors, and just hosts a blank white page. I assume it has to do with some change between Angular 5 to 6 and the default production build settings.
Our old build command used to be:
ng build --prod --aot --output-path="../ClientApp/static/angular" --deploy-url /static/angular
And this build worked perfectly every time, exporting our angular bundle to our Django app's directory. However, running this same build in Angular 6 does not work as intended, as I spoke about above.
We have changed our Angular.json to include an href: "/" in our default build options but that does not seem to help either. Again, there are no errors to try and solve, it just seems like the .js files are just not running properly or there is something off with our href, even though it was fine before the upgrade
Has anyone else run into this problem? I can't seem to find a good solution or changes for prod builds from Angular 5 -> 6.
I'll provide any additional details that might help find a solution.

What are the localhost URLs for OpenShift hosted Django apps

I created a Django application locally and then using the django openshift template from
here I uploaded it to OpenShift successfully. Now I'm trying to work on the local repository for adding additional features but when I run the server locally, I get a bad url error.
What I would like to know is how do I locally host a OpenShift Django App?
I also tried rhc tail -a appname but that only gets me a small amount of debug info If I can't locally host it then is there a way with which I can see the python print() output for the app hosted on OpenShift?