Deploy different from view on local server - javascript

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.

Related

in test server javascript in not loading IIS

I am deploying the Asp.net application on two different server test servers and a production server. in the production server, everything is fine but in the test server, JavaScript is not loading in chrome while in edge it's working fine. I have removed the content security policy header from the middleware but in vain.
This happens many times because when loading the script you need to update a version (otherwise it doesn't update the loading of the script), try adding like this:
<script src="myscripts.js#DataTime.Now"></script>
That way it will reload the script for you on every restart

Nuxt-mail works in local but not in online hosting

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.

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)

Client-side only AngularJS app

I am a little confused about how to run an AngularJS app.
Let me explain: my team and I are trying to make a project that will have a web service that the client side uses (written in JavaScript+HTML in AngularJS ), my problem is with the client side (some basic understanding).
I have seen the angular example but I don't want to use node and I have a little problem understanding something; how can I start my app(only the client side)?
how can I start it on my local computer so that the routing and everything will work without nodejs(because it doesnt work with file:// )
in general how can I start a site like this on a server with out something like node.
This is no my first website just in this format I never did from scratch and
I think I am missing some basic understanding I tried to research it but got all confused.
how can I start it on my local computer so that the routing and everything will work without nodejs(because it doesnt work with file:// )
Install a webserver
in general how can I start a site like this on a server with out something like node.
Install a webserver that isn't one you wrote using NodeJS. There are plenty out there.
You can do on your local computer using xampp or wamp server.
Same code will work on other server also like godaddys etc.
NOTE: Use relative path instead of absolute path.

Auto updating an html/angular app in client side

I'm building an app using angular. The app will run on the clients computer. When an update is there it will download a zip file from the server and upgrade the required files.
I guess js and html is incapable of copying and modifying files. Our first idea was to run a background application on the os to check for updates and do the updates as necessary. But what other approaches are there to achieve this?
Even if the application is offline, you can still host it, just use AppCache or something like it.
See this post for a tutorial:
http://www.sitepoint.com/creating-offline-html5-apps-with-appcache/

Categories

Resources