Yeonseo Nam Jul 1, 2020 2020-07-01T19:34:00+09:00
Mar 28, 2022 2022-03-28T09:07:56+09:00 3 min
- Development Env.
- post date : 2020. 07. 01
- OS : macOS Catalina 64bit, Windows 10 64bit
- Nodeserver : 1.0.0
- NuxtJS : 2.13.2
NuxtJS 설치
NuxtJS - installation
NodeJS가 설치되어 있다면, 아래 사이트를 따라합니다.
NuxtJS - 처음부터 nuxt 시작하기
그 후, create-nuxt-app 사용하기 를 통해서 빠르게 nuxt 프로젝트를 생성했습니다.
1
2
| > npx create-nuxt-app nuxtClientTest
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
| create-nuxt-app v3.1.0
✨ Generating Nuxt.js project in nuxtClientTest
? Project name: nuxtClientTest
? Programming language: TypeScript
? Package manager: Npm
? UI framework: None
? Nuxt.js modules: (Press <space> to select, <a> to toggle all, <i> to invert selection)
? Linting tools: (Press <space> to select, <a> to toggle all, <i> to invert selection)
? Testing framework: None
? Rendering mode: Universal (SSR / SSG)
? Deployment target: Server (Node.js hosting)
? Development tools: (Press <space> to select, <a> to toggle all, <i> to invert selection)
...
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
🎉 Successfully created project nuxtClientTest
To get started:
cd nuxtClientTest
npm run dev
To build & start for production:
cd nuxtClientTest
npm run build
npm run start
For TypeScript users.
See : https://typescript.nuxtjs.org/cookbook/components/
|
1
2
| > cd .\nuxtClientTest\
nuxtClientTest> npm run build
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
| > nuxtClientTest@1.0.0 build C:\Users\PC\Documents\git\yeonseo\nuxtClientTest
> nuxt-ts build
i Production build 09:45:37
i Bundling for server and client side 09:45:37
i Target: server 09:45:37
√ Builder initialized 09:45:37
√ Nuxt files generated 09:45:37
i Starting type checking service... nuxt:typescript 09:45:41
√ Client
Compiled successfully in 8.26s
√ Server
Compiled successfully in 535.28ms
Hash: 71025251c6962d8bda9a
Version: webpack 4.43.0
Time: 8259ms
Built at: 2020-07-01 9:45:50 AM
Asset Size Chunks Chunk Names
../server/client.manifest.json 6.68 KiB [emitted]
LICENSES 389 bytes [emitted]
app.57dbd67.js 52.8 KiB 0 [emitted] [immutable] app
commons.app.7871ae3.js 153 KiB 1 [emitted] [immutable] commons.app
pages/index.ad64b17.js 2.99 KiB 2 [emitted] [immutable] pages/index
runtime.90d5c68.js 2.32 KiB 3 [emitted] [immutable] runtime
+ 2 hidden assets
Entrypoint app = runtime.90d5c68.js commons.app.7871ae3.js app.57dbd67.js
Hash: 5d359b434b64da019f2b
Version: webpack 4.43.0
Time: 536ms
Built at: 2020-07-01 9:45:50 AM
Asset Size Chunks Chunk Names
pages/index.js 12.3 KiB 1 [emitted] pages/index
server.js 80.4 KiB 0 [emitted] app
server.manifest.json 207 bytes [emitted]
+ 2 hidden assets
Entrypoint app = server.js server.js.map
i Ready to run nuxt start
|
이제 서버를 로딩하여 localhost:3000에 Nuxt 프로젝트를 시작할 수 있습니다. Nuxt 명령어는 NuxtJS - 명령어 리스트 에서 확인해보시길 바랍니다.
1
| nuxtClientTest> npm run start
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| > nuxtClientTest@1.0.0 start C:\Users\PC\Documents\git\yeonseo\nuxtClientTest
> nuxt-ts start
╭─────────────────────────────────────────╮
│ │
│ Nuxt.js @ v2.13.2 │
│ │
│ ▸ Environment: production │
│ ▸ Rendering: server-side │
│ ▸ Target: server │
│ │
│ Memory usage: 77.6 MB (RSS: 130 MB) │
│ │
│ Listening: http://localhost:3000/ │
│ │
╰─────────────────────────────────────────╯
|
NuxtJS 구조