ผลต่างระหว่างรุ่นของ "Se63/nestjs-react-install-notes"

จาก Theory Wiki
ไปยังการนำทาง ไปยังการค้นหา
 
(ไม่แสดง 1 รุ่นระหว่างกลางโดยผู้ใช้คนเดียวกัน)
แถว 1: แถว 1:
 +
: ''หน้านี้เป็นส่วนหนึ่งของ [[se63]]''
 
== Backend: ติดตั้ง NestJS ==
 
== Backend: ติดตั้ง NestJS ==
  
แถว 28: แถว 29:
 
  cd cr-frontend
 
  cd cr-frontend
 
  npm install
 
  npm install
 +
 +
'''บน windows''': แก้ port ตามนี้
 +
 +
"start": "set PORT=2000 && react-scripts start"

รุ่นแก้ไขปัจจุบันเมื่อ 02:57, 17 สิงหาคม 2563

หน้านี้เป็นส่วนหนึ่งของ se63

Backend: ติดตั้ง NestJS

ติดตั้ง @nestjs/cli

npm install @nestjs/cli

สร้าง nest app cr-backend

npx nest new cr-backend

เรียก install node modules

cd cr-backend
npm install

Frontend: ติดตั้ง NestJS

เรียก create react app (ไม่ต้องติดตั้ง) เพื่อสร้าง cr-frontend อย่าลืมใส่ --template typescript

npx create-react-app cr-frontend --template typescript

ลบ node_modules ที่ project หลักก่อน กัน package ตีกัน (ดู folder ดีๆ) ถ้าบน linux/mac สั่ง

rm -rf node_modules

ติดตั้งของ

cd cr-frontend
npm install

บน windows: แก้ port ตามนี้

"start": "set PORT=2000 && react-scripts start"