Nuxt-mail works in local but not in online hosting - javascript

I configured Nuxt-mail to use an external mail server (from the hosting provider) like this:
I send the email like the following (test both with Axios and not):
Everything works fine when I try it from my computer (localhost) as you can see here:
But it fails when I try from the online website:
The Nuxt app is up as static website, I don't know if it makes a difference.
Do you have any idea how to solve this?
Thanks a lot.

I recommend doing a quick search.
You'll notice what you're trying to achieve (static website) is not feasible. You will indeed need a running node.js server.
PS: websites like Netlify and Vercel do not allow for such thing.
It works locally because you have a webpack dev server running when using your project locally.

Related

Deploy different from view on local server

I was building a site and during building I checked it out through live server and everything was OK. Now after deploying on netlify. The site looks different and scattered, what could be causing this
Because of the different servers that allow certain parameters in the code and in the other not, maybe in live server some of the tags or code that you wrote don't work in netlify.

NodeJS from localhost to online site

I have a site that I created using NodeJS and one page html/jquery everything is working as expected on the localhost provided but I'm getting some issue in putting that site online www.xxxx.com, I already got a .com domain but I don't know which configuration should I do on my site and on code , which mean is there steps to follow on the app.js which contain the localhost:3500 ?
This is the structure of my folder developped under VSCODE
and this is my statement app.js of the localhost
//start the server.
app.listen(3500, function () {
console.log('Example app listening on port 3500!');
});
Hope I mentioned everything
Best Regards
To host a website you don't' just need the domain name (.com) but you need the server and hosting as well.
Here you can find details:
Set Up Nginx Server Blocks (Virtual Hosts) on Ubuntu using NGINX (free and open-source)
https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04
For Windows:
https://www.rapidvaluesolutions.com/tech_blog/nginx-server-deploying-web-applications/
If you're like me who doesn't want to get into the configuration details of the host server, check out heroku. It's a platform-as-a-service that allows you to host a site really easily and it has a pretty generous free-tier. Not much will have to change code-wise maybe just making the port a variable.
One major issue I had with the platform is that you cannot save files on the filesystem using code, you'll have to use an external file storage like AWS.
The other, slightly minor issue is that you need to be using git to push your code to the heroku servers (Not really an issue tbh since you really should look into git if you aren't using it already)

Simulate XMLHttpRequest as from localhost or Remote Connection to a machine

I have a website hosted in ISS (can be other) that loads when it's called on localhost but not from extern :) like: http://:8081/Website.html.
The verification whether the website is called from localhost it's on the client in a js script that I can’t modify as it’s encrypted.
So I was thinking at two options:
Develop an ASP application that has a remote desktop connection to the machine that host the website (not some many example on how to).
Maybe configure the IIS configuration (didn't found how)
I'm out of ideas
Do you have any other solution or can you point on how can I do one of the above?
I have tried the WinForm solution from here: https://www.codeproject.com/kb/cs/remotedesktop_csharpnet.aspx and it doesn't work. And I prefer a website.
Updates:
The only working solution that I have for now is to configure a Remote Desktop Services (Web Access) as I hosted the application on Server 2008 R2. Then I only shared the browser that has the localhost page as default page
The javascript files are all minified and encrypted, meaning that if I search localhost as a word in all the files, nothing shows up. So fixing the client will be hard.
Is it possible to create a new Site Binding on IIS and access the site using the binding hostname? This requires your network DNS to register the hostname to the IP Address.
I assume you are dealing with encrypted(???) javascript that is hardcoded to display DOM only if it is loaded from localhost.
If by encrypted you mean minified you should still be able to find reference to "localhost" and modify javascript in minified version. If it is really encrypted by a wrapper of third party javascript library then I would suggest you to rewrite javascript. I mean how can there be any quality code in javascript code that is hardcoded to load only from localhost?
Fix the client and stop exploring other solutions like remote desktop connection. None of them are practical and sustainable solutions.
I think you need to use WebRTC, but it's supported for Chrome and Firefox. It allows two users to communicate directly, browser to browser using the RTCPeerConnection API.

Do i need to install some packages to run javascript on debian

I have to set up a web server using a existing code done by an other intern.
I have a web server on debian, I've already set up the web server and it works.
When I copied his code on the server, I noticed that it doesn't work perfectly.
His code contains some javascript and I want to know if I have to download some further packages on my debian server to let it run properly.
I have tried his code before on a WAMP server and I didn't got a problem when runnig his code, that's why I thought that maybe the reason was the javascript present on his code.
I've done some research on google and I have many links on Node.js but I can't really understand how It will solve my problem.
Thank you for reading my post and also for your answers!!
Perhaps you can try this:
https://packages.debian.org/squeeze/javascript-common
I am interested about debian too, but still a newbie here...

Interacting with Firebase (offline and online)

I now this is probably a dumb question, but I'm new to web development and I need to clarify this: to interact with Firebase, my code needs to be in a web server or a CDN, right? I can only test if the connection between Firebase and my files if they are online?
Thanks.
You can build and test Firebase apps without putting the files online anywhere. You can simply create a test.html on your local filesystem and open it in a browser (i.e. as a file://.../test.html url) and Firebase will work 100% fine.
Note that if you want to use Firebase Simple Login (for facebook/twitter/github/email+password auth), the files do have to be served by a web server. You can still do this locally though. You just have to spin up a local web server. This can be as easy as "python -mSimpleHTTPServer" if you're on a unix-like OS (linux, OSX, etc.). Then point your browser at http://localhost:8000/test.html or whatever.
You don't need to put the files online until you actually want to deploy your app and have other people use it.
Your server-side code will need to be on a server to execute, but that server doesn't need to be online. Try a local server like XAMPP or a bitnami stack

Categories

Resources