create-express-esm 1.0.2 โ 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -0
- package/package.json +6 -2
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# ๐ Create Express ESM (CLI)
|
|
2
|
+
|
|
3
|
+
> **Modern Express Generator**
|
|
4
|
+
>
|
|
5
|
+
> "๋ ์ด์ ๊ตฌ์ ๋ฌธ๋ฒ(`require`)๊ณผ ๋ณต์กํ ์ค์ ์ ์๊ฐ์ ๋ญ๋นํ์ง ๋ง์ธ์."
|
|
6
|
+
> ๋ช
๋ น์ด ํ ์ค๋ก **ES Modules**์ **Layered Architecture**๊ฐ ์ ์ฉ๋ ํ๋ก์ ํธ๋ฅผ 1์ด ๋ง์ ์์ฑํฉ๋๋ค.
|
|
7
|
+
|
|
8
|
+
[](https://www.npmjs.com/package/create-express-esm)
|
|
9
|
+
[](https://opensource.org/licenses/MIT)
|
|
10
|
+
|
|
11
|
+
## โจ Key Features (ํต์ฌ ๊ธฐ๋ฅ)
|
|
12
|
+
|
|
13
|
+
๊ธฐ์กด `express-generator`์ ํ๊ณ๋ฅผ ๋ถ์ํ๊ณ ๊ฐ์ ํ์ฌ ๊ฐ๋ฐํ์ต๋๋ค.
|
|
14
|
+
|
|
15
|
+
- **โก๏ธ 100% ES Modules**: ๊ตฌ์ CommonJS(`require`)๋ฅผ ๋ฒ๋ฆฌ๊ณ ์ต์ `import/export` ๋ฌธ๋ฒ์ ๊ธฐ๋ณธ์ผ๋ก ์ฑํํ์ต๋๋ค.
|
|
16
|
+
- **๐ Layered Architecture**: ์ค๋ฌด ํ์ค์ธ `Controller` - `Service` - `Model` ๊ตฌ์กฐ๋ฅผ ์๋์ผ๋ก ์ก์์ค๋๋ค.
|
|
17
|
+
- **๐ฆ Auto Installation**: ํ๋ก์ ํธ ์์ฑ ํ ๊ท์ฐฎ์ `npm install` ๊ณผ์ ์ ์๋์ผ๋ก ์ํํฉ๋๋ค.
|
|
18
|
+
- **๐ Ready-to-Use**: `dotenv`, `cors`, `morgan`, `nodemon` ๋ฑ ํ์ ๊ฐ๋ฐ ํ๊ฒฝ์ด ์ธํ
๋์ด ์์ต๋๋ค.
|
|
19
|
+
|
|
20
|
+
## ๐ Quick Start (์ฌ์ฉ๋ฒ)
|
|
21
|
+
|
|
22
|
+
๋ณ๋์ ์ค์น ์์ด `npx` ๋ช
๋ น์ด๋ก ์ฆ์ ์คํํ ์ ์์ต๋๋ค.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx create-express-esm
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
๋๋ ์ ์ญ์ผ๋ก ์ค์นํ์ฌ ์ฌ์ฉํ ์๋ ์์ต๋๋ค.
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
npm install -g create-express-esm
|
|
32
|
+
create-express-esm
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## ๐ Project Structure (ํด๋ ๊ตฌ์กฐ)
|
|
36
|
+
|
|
37
|
+
์ด ๋๊ตฌ๋ **Layered Architecture (๊ณ์ธตํ ์ํคํ
์ฒ)**๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ํ๋ก์ ํธ๋ฅผ ์์ฑํฉ๋๋ค.
|
|
38
|
+
**๊ด์ฌ์ฌ ๋ถ๋ฆฌ(Separation of Concerns)** ์์น์ ์ ์ฉํ์ฌ, ๋ก์ง์ด ์์ด์ง ์๊ณ ์ ์ง๋ณด์๊ฐ ์ฌ์ด ๊ตฌ์กฐ๋ฅผ ์ ๊ณตํฉ๋๋ค.
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
my-app/
|
|
42
|
+
โโโ src/
|
|
43
|
+
โ โโโ config/ # โ๏ธ ํ๊ฒฝ๋ณ์ ๋ฐ DB ์ฐ๊ฒฐ ์ค์
|
|
44
|
+
โ โโโ controllers/ # ๐น๏ธ ์์ฒญ๊ณผ ์๋ต ์ฒ๋ฆฌ (Controller Layer)
|
|
45
|
+
โ โโโ models/ # ๐๏ธ ๋ฐ์ดํฐ๋ฒ ์ด์ค ์คํค๋ง (Data Access Layer)
|
|
46
|
+
โ โโโ routes/ # ๐ฆ API ๋ผ์ฐํ
์ ์ (Route Definitions)
|
|
47
|
+
โ โโโ services/ # ๐ง ๋น์ฆ๋์ค ๋ก์ง (Service Layer) - ํต์ฌ ๋ก์ง!
|
|
48
|
+
โ โโโ app.js # ๐๏ธ Express App ์ค์ (Middleware, CORS ๋ฑ)
|
|
49
|
+
โ โโโ server.js # ๐ ์๋ฒ ์คํ ์ง์
์ (Entry Point)
|
|
50
|
+
โโโ .env # ๐ ํ๊ฒฝ ๋ณ์ (Port, DB Key ๋ฑ)
|
|
51
|
+
โโโ .gitignore # ๐ Git ๋ฌด์ ์ค์
|
|
52
|
+
โโโ package.json # ๐ฆ ํ๋ก์ ํธ ์์กด์ฑ ๋ฐ ์คํฌ๋ฆฝํธ
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## ๐ Tech Stack (๊ธฐ์ ์คํ)
|
|
56
|
+
|
|
57
|
+
Runtime: Node.js
|
|
58
|
+
|
|
59
|
+
Framework: Express.js
|
|
60
|
+
|
|
61
|
+
Architecture: Layered Pattern (Controller-Service-Model)
|
|
62
|
+
|
|
63
|
+
Language: JavaScript (ES6+ Modules)
|
|
64
|
+
|
|
65
|
+
Tools:
|
|
66
|
+
|
|
67
|
+
dotenv (ํ๊ฒฝ๋ณ์ ๊ด๋ฆฌ)
|
|
68
|
+
|
|
69
|
+
cors (CORS ์ค์ )
|
|
70
|
+
|
|
71
|
+
morgan (HTTP ๋ก๊ทธ)
|
|
72
|
+
|
|
73
|
+
nodemon (๊ฐ๋ฐ์ฉ ์๋ฒ ์๋ ์ฌ์์)
|
|
74
|
+
|
|
75
|
+
## ๐ค Contributing
|
|
76
|
+
|
|
77
|
+
๋ฒ๊ทธ ์ ๊ณ , ๊ธฐ๋ฅ ์ ์, PR์ ์ธ์ ๋ ํ์ํฉ๋๋ค! ์ด์๋ Issues ํญ์ ์ด์ฉํด ์ฃผ์ธ์.
|
|
78
|
+
|
|
79
|
+
## ๐ License
|
|
80
|
+
|
|
81
|
+
This project is MIT licensed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-express-esm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "A modern CLI tool to bootstrap Express.js applications with ES Modules and Layered Architecture.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -18,5 +18,9 @@
|
|
|
18
18
|
"commander": "^14.0.2",
|
|
19
19
|
"fs-extra": "^11.3.2",
|
|
20
20
|
"inquirer": "^13.0.1"
|
|
21
|
-
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"bin",
|
|
24
|
+
"template"
|
|
25
|
+
]
|
|
22
26
|
}
|