simulate a server vs running the html file [closed] - javascript

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I recently started some web-design and when I look for tutorials on youtube I often see people, when checking their code, using some kind of virtual server to upload and then see their page. I was wondering what difference would there be to simply lunch the html file I'm working and see it through my browser? Does it really make a difference to use a local server? and if yes which ways would you recommend to achieve that?
Thanks!

If you just have pure html and css then opening the file in the browser is the exact same as opening it in a server. However, the real difference is with javascript. If you try to make an HTTP request using js to your own site, it will work on a server but will not work if you open it as a file. If you want to start a server, python has a SimpleHTTPServer module, and most code editors have some sort of plugin, like VS Live Server for VS Code.

Related

questions about php and node.js with answers [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I'm working with PHP and I love this language but when I look at big websites there a small percentage of them using PHP and the rest of using node.js etc, so based on the big websites like Netflix, etc, have some questions
1- Is PHP required in companies?
2- what PHP framework should I learn
3- what frontend framework, etc, good for PHP?
4- is node.js better than PHP
if there is anything wrong or you can correct me I'm here to learn :)
I'm very lost I really need the answer I don't know where to go.
in PHP there is no way to automatically refresh the page however
there is a guide on this page to do that
if you started to use a framework like Laravel you can do that with
the Browsersync plugin
I have seen a lot of PHP and Laravel projects requests in freelancing
websites than node js so yes it's required
both languages are needed there is no language better than the other
one each one have its use cases

Should a markdown parser be client or server side [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm currently working on a PHP project, which should use markdown to display some text.
The question I ask myself now since there are markdown parsers for javascript and PHP is if I should parse the markdown Server or Client Side.
Pros Server-side:
Always the same, even on clients which have javascript disabled.
Pros Client-side:
More dynamic allows for Preview function.
Uses Clients-Resources instead of the Servers.
Did I miss anything?
What would you suggest?
Any help is appreciated!
Inspired by so-called Isomorphic Javascript or Universal Javascript, I suggest you to make the first rendering on server side; then when you update your page —using ajax— you make the rendering on client side. Doing so you would get the pros of both solutions:
a fast initial rendering of the page (no need to wait for the JS libraries to be loaded)
a reduced server load for following requests
an up-to-date user experience for edition

How to browse the client machine's logical drives, folders and subfolders in asp.net c# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
How to browse the client machine's file system. Since it is not possible through c#, I've been trying through various resources like javascript and using activex control. Can someone help me in working out with how to get it done using either javascript or activex control.
Requirement:
My requirement is something like, when the client logs in, the code should be able to browse through the clients file system (drives, folders and subfolders) when he wants to navigate through. I need to display the file system in the form of treeview.
Thanks in advance.
Did you tried FileUpload Control? Hope so it will work for you to some extent.
Apart from this, no javascript or server side code can perform this action.

How do I code for a login system in php? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have been researching this for a few weeks now, and am still stuck. I still don't understand how to make a custom login system. I can't get the database for mySQL for mac or PC, and Ruby on Rails would mean me to code in erb language and I don't understand erb. Can someone help?
First of all, you need to setup a localhost. For Mac, to get started, you can use MAMP or XAMPP. These will set up a local environment for you as well as a way to connect to a Database.
Once you've installed this, you need to create a database (MAMP and XAMPP come with an integrated Database UI called PhpMyAdmin).
Once you have set up your environment, you can start to integrate PHP.
There are various tutorials online to do this, here is a list of some simple ones:
http://www.webgeekly.com/tutorials/php/how-to-make-a-login-system-with-php/
http://www.phpro.org/tutorials/Basic-Login-Authentication-with-PHP-and-MySQL.html
If you have never used PHP before, I suggest you read up on the basics before diving into creating a login system, as you won't understand that much of it.

How to load test a JavaScript/AngularJS app? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have a JavaScript/AngularJS app, which connects with a server via websockets.
Is there an easy way for a load test? For example, I would like to see what happens when the app is called 100x at the same time (so there are 100 connections to the webserver).
Is there a simple way to test it? If I need software for this, it should run local, since the app is on my computer.
Thank you very much!
You can try https://github.com/kidk/felt
It uses real browsers to generate load to a website. It is still a young project, but it might be the solution you are looking for.
(This is my personal project)
Fallowing link may helps to you .
https://github.com/observing/thor
The AngularJS crew have developed Protractor for end-to-end testing
https://docs.angularjs.org/guide/e2e-testing

Categories

Resources