npm install
npm run serve
then visit http://localhost:3000 for ssr development
Take care: npm run serve will start two services:
- static service running by npm run dev:client command. It use to hot-reloads static resources
- SSR service running by npm run dev:server command. this
others:
- You can set static service port by setting env STATIC_PORT=xxxx on package.json's scripts。
- If directly visit http://localhost:8090,then into the CSR mode. The html is not produced by SSR.
npm run dev:client
npm run build
npm run serve
npm run build
npm run build command will execute two commands as shown below.
- npm run build:client generate files for client render
- npm run build:server generate files for server render
npm run lint
npm run lint:fix