Back
>初期設定

初期設定

Date: 2021-03-31 11:55
Category : headless-1

初期設定


■ Setup

npm install


■ Setup , etc

  • next.config.js ,

if change URL, mongodb URL, database name

BASE_URL: "http://localhost:3001"
MONGODB_URL: "mongodb://localhost:27017",
MONGODB_DB_NAME: "hcms",    
  • package.json / scripts

if change, port number ( -p )

"dev": "next dev -p 3001"

■ Start server

  • Start :
yarn dev
  • if change ,release mode
yarn serve