템플릿 초기 버전

This commit is contained in:
2026-06-11 20:31:47 +09:00
commit 2d45f80dd7
3 changed files with 41 additions and 0 deletions

20
README.md Normal file
View File

@@ -0,0 +1,20 @@
# Node.js 앱 템플릿
Playground에 배포되는 Node.js 웹앱의 출발점입니다.
## 사용법
1. 이 저장소 화면 오른쪽 위 **"이 템플릿 사용"** 버튼으로 내 앱 저장소를 만듭니다
(소유자: **playground**, 이름: 영문 소문자, 예: `2610434-lunch-picker`).
2. Coder 워크스페이스 터미널에서 복제합니다:
`git clone https://gitea.bokdev.in/playground/<내앱이름>.git`
3. Claude Code에게 원하는 앱을 만들어 달라고 하세요. 예:
"index.js를 고쳐서 점심 메뉴 추천 앱을 만들어줘"
4. 커밋/푸시 후 Kubero(https://kubero.bokdev.in)에서 배포하면
`http://<내앱이름>.apps.bokdev.in` 으로 접속됩니다.
## 꼭 지킬 규칙 (배포 규격)
- HTTP 서버는 **0.0.0.0 의 8080 포트**에서 떠야 합니다.
- 새 패키지를 쓰면 `package.json`에 꼭 추가하세요 (Claude에게 부탁하면 해줍니다).
- 파일에 저장한 데이터는 재배포하면 사라집니다.

12
index.js Normal file
View File

@@ -0,0 +1,12 @@
// 내 앱의 시작점입니다. Claude Code에게 "이 앱을 ~하게 바꿔줘"라고 요청하세요.
// 규칙: 반드시 0.0.0.0:8080 에서 HTTP 서비스해야 합니다 (배포 규격).
const http = require("http");
const server = http.createServer((req, res) => {
res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
res.end("<h1>안녕하세요! 나의 첫 Playground 앱입니다 🎉</h1>");
});
server.listen(8080, "0.0.0.0", () => {
console.log("listening on 8080");
});

9
package.json Normal file
View File

@@ -0,0 +1,9 @@
{
"name": "playground-app",
"version": "1.0.0",
"description": "Playground 앱 (Node.js)",
"main": "index.js",
"scripts": {
"start": "node index.js"
}
}