Durandal App/main.js not found in IIS app - durandal

I've been developing an app with Durandal locally, and pushing to Azure, and all has been fine
however, I tried to add it to my local IIS for colleagues to preview to
http://yeps85228/gstt, it doesn't get started, with this error:
GET http://yeps85228/App/main.js 404 (Not Found)
so, how can I reroute App to
http://yeps85228/gstt/App/main.js
so it's the relative path of the application
I've added the App and Scripts folders as IIS virtual folders from the root, so it runs for now, but is there a better way?
cheers

I had the same issue. Add the base tag at the beginning of your page:
<html>
<head>
<base href="http://yeps85228/gstt/" />
...
documentation for the base tag is here.

Related

NextJS Images hosted on AWS S3 in don't show up in production

For a web app I'm developing, all of the images are stored on s3. In the development environment, everything works great and all images load just fine from the external URLs. When deployed however there is no way to load any of the images and they simply default to the alt text.
Steps Taken
added s3 bucket base URL to the next.config.js file
added same URL to ENV variables on the deployed instance
deployed to digital ocean and netlify only to see the name issue
tried using just regular <img> tags
tried using next/image optimized images
All attempts have the same result and the console logs the following error for each image:
This error is for <Image /> components:
GET <vercel_url>/_next/image?url=https%3A%2F<bucket_base_url>%2Fstatic%2Fimages%2Fshowcase%2Fdashboard-desktop.svg&w=3840&q=75 404
This error is for <img /> components:
GET <vercel_url>/<bucket_base_url>/static/images/showcase/view-portfolio.svg 404
I'm not sure what to do I've spent crazy numbers of hours trying to solve this issue
The issue was that I'm an idiot and I was using a URL generation function that spits out windows formatted paths. That's why they worked on the dev environment, because windows normalized the paths to a real URL.

Is there a difference in page paths when on localhost verses deployed?

My app is created in next.js and works great in localhost. When I deployed it in heroku, only the front page shows up and all page paths do not work even though they are correctly inputted in the browser. The only page that is connected to the index.js file in my page paths is the front page. Do the other pages need to also be connected to the indec.js file? I am terribly lost with this issue since the site works perfectly in localhost. In heroku every page path besides / has a 404 error. I didn't add any code to this question since no one file seems relevant to the issue. I've been searching all over for an answer to this issue but can't seem to find any relevant information online since the app is deployed successfully it just won't render any file paths besides /.
Thank you in advance for any help you can offer. I really appreciate it!
Applications are ran differently on localhost and when deployed to the server. Since you added react tag on the post, I assume you are trying to deploy react native app on Heroku, there is lots of information on internet how to do it.
For example this post.
Anyway first you need to build your app correctly, so static files would be generated (you didn't mentioned how you are running that app).
To your question:
Relative paths are the same on both local and server, but absolute paths will be different.
But for your 404 error I see that no static content are found on the root path.

IBM Worklight 6.0 - content root and local worklight server set-up

I am teaching myself Worklight. I followed the Get Started guide provided by IBM (http://www.ibm.com/developerworks/mobile/worklight/getting-started.html).
Examples in the above site use relative path to link to a page or getting images. Is it possible to put a / (foreward slash) in front of each link to make it relative to the root folder? If possible, how can I configure my local worklight server so the links and images work on the app?
I have app set up as below directory structures in the /common/ directory. Many pages load shared header and menu on the page. When I use <a href="/app-pages/page1.html">' or <img src="/images/ImageName.png">, This causes 404. Not Found - http://localhost:10080/images/ImageName.png
home.html
/app-pages/page1.html
/app-pages/page2.html
/app-pages/sub-cat/pageA.html
/app-pages/sub-cat/pageB.html
/shared/header.html
/shared/menu.html
/images
/css/
/js/
/jqueryMobile
FYI, my dev environment is as below.
Windows 7
Eclipse Juno
Worklight 6.0
In a new Worklight application called "test", under the common folder you will have the following hierarchy:
css
images
js
test.html
In test.html, if I will add <src="images/icon.png"/> then once previewing the app the icon.png image located in the images folder will be displayed:
I see that you are also trying to use multiple pages in your app. Make sure to read the Building a multi-page application training module.

Deploy GWT and HTML application

I have a simple site, that uses just four HTML pages. One page has a <div id=main_container /> element. From the GWT application I use the RootPanel.get("main_container") to access that element. The GWT app uses GWT-RPC to connect to a server (written in java). My problem is how to test it on xampp, because if I compile the GWT app and upload the war files and put inside it the four HTML files, then I can access all of the pages except the one that contains the <div> element. I need some help here!
If you are using GWT-RPC, you also need an Application Server like jetty or tomcat. Apache alone is not enough.
If you are developing your app, there is no need for apache as you can run your whole web app in DevMode or just jetty.
In production what you want to do is set up Apache as a proxy to your web app running on jetty. Just to be clear, you cannot run a GWT app that also uses GWT-RPC on most shared host environments.

Apache not loading CSS files on remote browsers but works on localhost

I have an ubuntu installation on my laptop i use for web app development. When i type in http://localhost/blah.php i see my php web page as i normally would with all css style loaded and rendering fine.
When i try to connect to this same apache server from a remote machine by typing in the IP address the page loads but without any css styling at all. I also get the same problem trying to connect to the apache server from a virtual machine on the same box. I would like to get this working so i can test my web apps in IE but obviously css not loading is a problem. Any tips ?
Look into your source code and look how your style sheets are referenced.
If you have references to http://localhost/mystylesheet.css, that's your problem right there.
If that doesn't help, try to access a style sheet directly (enter the address in the browser) and tell us what happens. Also post the URL you are using. The head of the HTML document you are calling would also be helpful.