I have Parcel installed to compile my javascript files. According the documentation I run parcel index.php commnad and tried to open localhost:1234 in the browser. No error in console only success message server is running on localhost:1234. But as I open the address I have 404 This localhost page can’t be found. What am I doing wrong?
Also if I try to use it like file watcher for index.js it works only for the first code update. Any other chages are not reflected in the result html..
Related
I was using MVN install deploy my code on the AWS tomcat. I did this by directly open the AWSname:8080/manager/html and upload the WAR file(I am not sure if it is the correct way). The server can load the index.html successfully as my expectation and shows page on the front-end, but error went to call AJAX, which is in Javascript file, it always return 404. The servlet's url pattern will be like this
AJAX
Login Servlet
I tested everything fine on my localhost:8080, but in the AWS tomcat, the log showed like this.
Tomcat Log
I've never met such a case before, could somebody give me some useful suggestions on the possible solutions?
from your description it is not clear if you have multiple apps/war/containers/servers.
From your message you have a UI, which seems not to be bundled into your war file. To check in this case use these steps to check your setups
Add a index.html to your root in the war file and test if you can access it locally.
if this works, deploy on AWS and try to access the same path on AWS.
if the page is showing, your context is defined well on AWS. So you have an issue with your URL mappings
But if it does not show, you have a URL problem (wrong URL on AWS)
I have just recently started learning about APIs as party of Full stack developer course. Everything has been working fine until I have activated system storage sense in Windows to clear some space in the disk /c, the curl command stopped working and is giving internal server error.
curl calling request error using bash terminal
I have realized there is an issue when I have run my code and it stopped pulling information from the API link.
Since you made a windows change my guess would be - try addding the curl folder path to your Windows PATH environment variable so that the curl command is available from any location at the command prompt.
I use Prerender for the first time and it works almost well... in production only.
In fact, if I run my meteor server with meteor --production there is no error in the console and only a white page but if I run it with meteor, the phantom console print a lot of errors when I try to load a page with ?_escaped_fragment_=.
Here are the packages I use
and here is what the phantom console print
I've run meteor build to create my bundle, uploaded to the server, it runs fine, however the .css and .js paths are wrong, as it's using the root url. I need to run this from within a /project folder. Again it's running, but 404 on the files as they're not prefixed with /project.
eg. http://domain.com/65d054cb90ff094804072528d222178ddbf625e22.js?meteor_js_resource=true 404 (Not Found)
needs to be http://domain.com/project/65d054cb90ff094804072528d222178ddbf625e22.js?meteor_js_resource=true
I've tried using ROOT_URL=http://domain.com/project node main.js, that gives an unknown path error, i've also tried using Meteor.absoluteUrl('project', {}); in conjuntion with rooturl but again, no avail.
Any of you fine people have any ideas? :) Thanks!
PS. It's running on an apache server with ProxyPass, if that's of relevance.
You could instruct your apache to redirect those calls with a ProxyPassMatch, such as:
<LocationMatch ^/(.*)meteor_js_resource=true$>
ProxyPassMatch http://localhost/project/$1meteor_js_resource=true
</LocationMatch>
I open Chrome DevTools for a remote web site (not my localhost) and select "Add folder for workspace" under "Sources". In the added folder I have a few .js files.
When I try to execute a function from one of the files in the console, eg. the function "myMethod", I get "Uncaught ReferenceError: myMethod is not defined".
How do I run my own code-files side by side with the ones already loaded into the browser?
Adding a folder to Chrome Devtools allows you to edit files from chrome, but it doesn't include them to the current web page at all. To do that, you have to actually paste the code in the console, or append a new script node referencing the file. But this has nothing to do with Chrome Devtools.
document.body.appendChild((s=document.createElement('script'),s.src='myfile.js',s));
(replace myfile.js with the complete path to the file on your pc)