Skip to content

Instantly share code, notes, and snippets.

@ytez
Last active June 28, 2021 06:58
Show Gist options
  • Select an option

  • Save ytez/d271a2365b82b094cb54eb0cc8b310a3 to your computer and use it in GitHub Desktop.

Select an option

Save ytez/d271a2365b82b094cb54eb0cc8b310a3 to your computer and use it in GitHub Desktop.
Java Script + Web Server Test

Java Script + Web Server test

参照

  • SoloLearn JavaScript Course Overview

実行環境

$ php -S localhost:54321 -t $(pwd)

確認手順

  1. http://localhost:54321
  2. http://localhost:54321/document_write.html
  3. http://localhost:54321/external_js.html
    $ php -S localhost:54321 -t $(pwd)/01_OverView/
    PHP 7.3.7 Development Server started at Mon Jun 28 15:46:10 2021
    Listening on http://localhost:54321
    Press Ctrl-C to quit.
    
    [Mon Jun 28 15:46:28 2021] [::1]:62863 [404]: / - No such file or directory
    [Mon Jun 28 15:46:28 2021] [::1]:59733 [404]: /favicon.ico - No such file or directory
    [Mon Jun 28 15:46:41 2021] [::1]:62361 [200]: /document_write.html
    [Mon Jun 28 15:46:49 2021] [::1]:61192 [200]: /external_js.html
    [Mon Jun 28 15:46:49 2021] [::1]:52779 [200]: /demo.js
alert("This is an alert box!");
<script>
document.write("<h1>Hello World!</h1>");
</script>
<html>
<head>
<title>external javascript</title>
</head>
<body>
<script src="demo.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment