最初のコードを構築する

This commit is contained in:
ry.yamafuji 2025-03-20 10:50:12 +09:00
parent c4817b0361
commit 915d909a07
5 changed files with 26 additions and 2 deletions

View File

@ -2,3 +2,6 @@
Javascriptで活用できるコードを開発する。 Javascriptで活用できるコードを開発する。
Node.jsによりサーバーサイドも作成する Node.jsによりサーバーサイドも作成する

13
src/front/index.html Normal file
View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>JavaScript Develop Debug</h1>
<p id="message">Open the console to see the output</p>
<script src="index.js"></script>
</body>
</html>

5
src/front/index.js Normal file
View File

@ -0,0 +1,5 @@
// Message
document.addEventListener("DOMContentLoaded", () => {
document.getElementById("message").textContent = "Hello, JavaScript!";
});

0
src/lib/common.js Normal file
View File

3
src/server/helloworld.js Normal file
View File

@ -0,0 +1,3 @@
// This is a simple Hello World program in Node.js
// Command node src\server\helloworld.js
console.log('Hello World!');