This TypeScript sample web application includes backend and frontend separated projects. The backend serves API service by Node.js Express, the frontend consists of Vue3 and Quasar framework.
Launch Frontend project and operate in frontend
directory.
- Install packages
yarn install
- Develop by Vite debug mode
yarn dev
-
Online debugging by Launch Chrome on Run and Debug view in VSCode.
-
Building operation generates Frontend modules in
frontend/dist
directory.
yarn build
# Test built modules by Vite
yarn preview
Lauch Backend Project and operate in root directry(Backend project directory).
- Ready
Backend requires Frontend modules in frontend/dist
directory.
Build Frontend in advance.
- Install modules
yarn install
- Launch from command line or online debuggging by Launch Server on Run and Debug view in VSCode.
# Debugging
yarn dev
# Building as product and launch server
yarn build
yarn start
# Debugging with source mapping
yarn start-debug
If launch Frontend and Backend separately, Frontend uses port 3001 and Backend uses port 3000.
Test Frontend and Backend integratedly at port 3001 from Web browser
Frontend redirects API(/api
) access at port 3001 to Backend at port 3000 by Vite proxy.
- Install packages(yarn install:all)
- Launch Frontend(cd frontend && yarn dev)
- Launch VSCode in Backend project, and debug Frontend and Backend by Full-Stack on Run and Debug view.
Build Frontend and Backend in order, or execute below commands in Backend project.
The destnations locate in dist
and frontend/dist
.
yarn install:all
yarn build:all
yarn start