How to see if gatsby-plugin-offline is working - reactjs

I am new to Gatsby so please bear with me.
I want to add offline support to my app such that if a user were to try access it while offline (after having visited it online) it would still show up.
Would gatsby-plugin-offline help me achieve this?
If so, how can I try this out? So far I have tried using the plug-in in my app (all default settings), building the app and then serving it locally on my computer at http://localhost:9000/. When I stop the dev server and try access http://localhost:9000/, it does not show up. How can I test to see if this plugin works?

After gatsby build the public folder should include sw.js file.
Otherwise, you can find whether the service worker is registered on not at Chrome Dev Console over Application > Service Workers.

Related

Deploy create-react-app on Azure App services

I am new to React and created a simple react app using create-react-app , it builds and runs fine on local. I created a Azure Build and release pipelines and tried deploying using App Services , refereed below Microsoft link to implement the same.
https://devblogs.microsoft.com/premier-developer/deploying-react-apps-to-azure-with-azure-devops/
Build and release pipeline runs successfully however when I click the Azure app services link to access the react app, I receive below message :-(
"This react-naturalone.azurewebsites.net page can’t be found
No web page was found for the web address: https://react-naturalone.azurewebsites.net/
HTTP ERROR 404"
Can someone please suggest what I am missing.
fyi, I am using react-router, hence added the web.config as mentioned in the link above.
Thanks
AOU
I'm thinking that there is a problem with your deployment pipeline. The first step for your here is to go to your Azure portal and open up your app service. From your app service, go to -->Development tools --> App service editor.
Do you see your code inside it? If you don't, you can confirm that the code didn't deploy correctly. If you do, then you have a misconfiguration somewhere in your app that is preventing anybody from seeing it.

Alfresco ADF login issue

I'm currently trying to get along with the Alfresco development environment but after installing properly Alfresco ECM, I'm stuck after having generated the demo app with yeoman.
I can't find the password despite that I've always put admin/admin in anything I've installed.
Alfresco ADF login page
Moreover when I generate an app from the github repository demos like the datatable for instance,
Files from the ng2-component datatable demo
It doesn't give me anything when I start it just a blank page at localhost:63621
I sincerely hope that anyone can help to resolve those issues which I believe may be linked.
P.S : besides that, everything works properly, the Share webapp works perfectly(I can log in with the users I created in it), even BPM (Activiti) that i wanted to try.
There are a couple of things that you can check:
If you are executing the FE and BE from different domains try to follow this guide:
https://community.alfresco.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FAlfresco%2Falfresco-ng2-components%2Fblob%2Fmaster%2FALFRESCOCORS.md
check the url it the settings for the Content service and Prcess service are correct.

How to get BlogEngine.NET to run outside of a local environment?

I am trying to run BlogEngine.NET. It works fine locally in Visual Studio but whenever I publish it outside of my local computer none of the posts are showing up.
I think this is because none of the scripts or CSS are being loaded (the posts are done via AngularJS). I've made sure that the read and write permissions are allowed in IIS so I know that isn't the problem.
I believe that AngularJS isn't loading properly, as when I go to the admin panel the url returned with the 404 error is this:
8926/admin/%7B%7BSiteVars.RelativeWebRoot%7D%7Dadmin/#/dashboard
instead of:
8926/admin/#/dashboard
Even If I manually take out all of the %7B%7BSiteVars.RelativeWebRoot%7D%7Dadmin text, the posts still don't show up as they do locally which leads me to believe the posts are also tied to AngularJS as well.
Does anyone know how to fix this? This may not be a BlogEngine.NET problem as much as it is just a loading of Javascript and CSS problem inside of IIS
The documentation for my project is here.
BlogEngine.Net had moved to GitHub that is where the latest updates are at.
Best to go here:
https://github.com/rxtur/BlogEngine.NET
and try again with a fresh install.
I have a fresh install working with no issues here:
http://blogengine07.azurewebsites.net
Took a total of around 30 mins to it it 100% up and running, creating new web app service,database, change web.config, publish to Azure, and making some changes in settings.
What web host are you using to host your website?
You can also try Azure Web App Service for free here:
https://azure.microsoft.com/en-us/try/app-service/web/?language=cs
If you can get it to work there but not at your current web host then that points to a web server issue, since you are able to run it locally and on Azure.
Hope this helps.
Have a great Day!
Brian Keith Davis

Deploying a cakePHP app on cpanel

I need guidance on how to host a cakephp app on cpanel. Apparently when I put my app on a shared server I get an error missing controller and yet all was well when running the app on localhost. please help
cPanel is just a control panel for your box and makes to change set to Apache or light speed that you couldn't do without it. That being said, the only things I would check first would be to check your database connection, makes sure your server has mod_rewrite enabled and that you're using a compatible version of php for cakephp AND your plugins.

Can't deploy to GAE - the application doesn't exist

Using Eclipse, I am experiencing an error when trying to deploy a rather basic web app with JAX-RS and JAXB. It runs okay locally, but when trying it on the remote servers I get the message shown below...
'Deploying to Google' has encountered a problem / This application does not exist
Below shows my appengine-web.xml
The XML file illustrates that I am using the same name in the xml as what's specified in the project properties...
The output window show...
------------ Deploying frontend ------------
Preparing to deploy:
Created staging directory at: '/var/folders/n8/6by626014jbfc0dwmxnb0ly00000gn/T/appcfg2754901216637807129.tmp'
Scanning for jsp files.
Scanning files on local disk.
Initiating update.
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=hillingarincident&version=0&
404 Not Found
This application does not exist (app_id=u'hillingarincident').
Debugging information may be found in /private/var/folders/n8/6by626014jbfc0dwmxnb0ly00000gn/T/appengine-deploy447984481661870877.log
The referenced debug logs show...
Unable to update:
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=hillingarincident&version=0&
404 Not Found
This application does not exist (app_id=u'hillingarincident').
at com.google.appengine.tools.admin.AbstractServerConnection.send1(AbstractServerConnection.java:293)
at com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:253)
at com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:232)
at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:644)
at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:449)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:124)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:371)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:53)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:433)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:148)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Any answers will be appreciated. At one point my browser was not logged in to the target google account, so I swapped to the correct one a little later, Google does render the application name as expected.
Okay, this was simple in the end! Eclipse performs an auto-login to the Google account, unfortunately I created the Eclipse project whilst being logged in to one Google account and then tried to specify the application name afterwards.
You'll see in the bottom-right (or bottom-left in some versions) a Google icon with the name of the user that you are logged in as. If that's not the account where your application is defined, then simply logout of that account, then login as the correct Google account.
Now there's no error :-)
I know this question is super old but I had this issue all day and finally I found a solution. Maybe it will help someone out in the future.
After you create a project in Google Cloud Platform, you must go to google cloud shell in your project and run the command
gcloud beta app create
After you run this command, you will get prompted to choose a region. Then go back to eclipse and try deploying it. It worked for me.
There are not just 1 way can cause this problem. For me, I have this problem when I create the project using Maven. But I don't have the same issue if I directly create the project from the Google plugin.
There might be another issue, when you register with Google App Engine, you receive email indicating your activation. If you have not received the email yet, this problem could occur too.
Another issue could be to use the gmail account for the Google App Engine to avoid any such errors.

Resources