shopping mall / headless server / v2.0 / vendure 2.0 /vendure 2
vendure server 실행하기
준비
- postgres 에 database 를 만든다. 여기서는 database 이름을
twin-dog
라고 할 것이다. - postgres 에 접근하는 id/pw 를 알아둔다.
실행
npx @vendure/create twin-dog
- 설치하고,
- 서버에 필요한 table 들을 생성하고,
- 원하면, 테스트값들을 넣어준다.
cd twin-dog && yarn dev
yarn dev
를 하면 server와 worker를 둘다 실행시켜 준다.yarn start
:package.json
을 보면, 추후에 실제 서비스를 할 때는yarn start
를 하면 된다.
- web browser 에서
http://localhost:3000/admin/login
를 입력해서 이동하자.- vendure 는 기본적으로 headless server라서 client 부분이 없다. 즉, 쇼핑몰 페이지는 없다. 다만 admin page 는 존재한다. 그래서 admin page 로 접속한다.
- admin page의 id/pw 는 아까
@vendure/create
로 생성할 때 입력한 값이다. 여기서는 기본값인 ’superadmin’을 사용했다.
D:\a\prog\sashow\real-world-vendure\test02>npx @vendure/create twin-dog
Port 3000 is in use. Please make it available and then re-try.
D:\a\prog\sashow\real-world-vendure\test02>npx @vendure/create twin-dog
Welcome to @vendure/create v1.9.2!
Let's configure a new Vendure project. First a few questions:
√ Which database are you using? » Postgres
√ What's the database host address? ... localhost
√ What port is the database listening on? ... 5432
√ What's the name of the database? ... twin-dog
√ What's the schema name we should use? ... public
√ What's the database user name? ... myaccount
√ What's the database password? ... ******
√ What identifier do you want to use for the superadmin user? ... superadmin
√ What password do you want to use for the superadmin user? ... superadmin
√ Populate with some sample product data? ... no / yes
Setting up your new Vendure project in D:\a\prog\sashow\real-world-vendure\test02\twin-dog
This may take a few minutes...
√ Installing dependencies
√ Installing dependencies
√ Generating app scaffold
√ Initializing server
Success! Created a new Vendure server at D:\a\prog\sashow\real-world-vendure\test02\twin-dog
We suggest that you start by typing:
cd twin-dog
yarn dev
Happy hacking!
D:\a\prog\sashow\real-world-vendure\test02>cd twin-dog
D:\a\prog\sashow\real-world-vendure\test02\twin-dog>yarn dev
yarn run v1.22.19
$ concurrently yarn:dev:*
$ ts-node ./src/index.ts
$ ts-node ./src/index-worker.ts
[worker] info 23. 8. 9. 오후 7:37 - [Vendure Worker] Bootstrapping Vendure Worker (pid: 15260)...
[worker] info 23. 8. 9. 오후 7:37 - [Vendure Worker] Vendure Worker is ready
[worker] info 23. 8. 9. 오후 7:37 - [JobQueue] Starting queue: apply-collection-filters
[worker] info 23. 8. 9. 오후 7:37 - [JobQueue] Starting queue: update-search-index
[worker] info 23. 8. 9. 오후 7:37 - [JobQueue] Starting queue: send-email
[server] info 23. 8. 9. 오후 7:37 - [Vendure Server] Bootstrapping Vendure Server (pid: 3428)...
[server] info 23. 8. 9. 오후 7:37 - [AdminUiPlugin] Creating admin ui middleware (prod mode)
[server] info 23. 8. 9. 오후 7:37 - [AssetServerPlugin] Creating asset server middleware
[server] info 23. 8. 9. 오후 7:37 - [EmailPlugin] Creating dev mailbox middleware
[server] info 23. 8. 9. 오후 7:37 - [RoutesResolver] HealthController {/health}:
[server] info 23. 8. 9. 오후 7:37 - [RouterExplorer] Mapped {/health, GET} route
[server] info 23. 8. 9. 오후 7:37 - [GraphQLModule] Mapped {/shop-api, POST} route
[server] info 23. 8. 9. 오후 7:37 - [GraphQLModule] Mapped {/admin-api, POST} route
[server] info 23. 8. 9. 오후 7:37 - [NestApplication] Nest application successfully started
[server] info 23. 8. 9. 오후 7:37 - [Vendure Server] ================================================
[server] info 23. 8. 9. 오후 7:37 - [Vendure Server] Vendure server (v2.0.5) now running on port 3000
[server] info 23. 8. 9. 오후 7:37 - [Vendure Server] ------------------------------------------------
[server] info 23. 8. 9. 오후 7:37 - [Vendure Server] Shop API: http://localhost:3000/shop-api
[server] info 23. 8. 9. 오후 7:37 - [Vendure Server] Admin API: http://localhost:3000/admin-api
[server] info 23. 8. 9. 오후 7:37 - [Vendure Server] Asset server: http://localhost:3000/assets
[server] info 23. 8. 9. 오후 7:37 - [Vendure Server] Dev mailbox: http://localhost:3000/mailbox
[server] info 23. 8. 9. 오후 7:37 - [Vendure Server] Admin UI: http://localhost:3000/admin
[server] info 23. 8. 9. 오후 7:37 - [Vendure Server] ================================================
See Also
- Extending Vendure’s functionality with custom plugins - DEV Community
- 쿠...sal: [컴][웹] vendure 설치 및 개발용 서버 실행
- vendure initial commit
- 쿠...sal: [컴] vendure 2.0 설치 및 실행
댓글 없음:
댓글 쓰기