Skip to content

frameable/vite-vue-express-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
David Chester
Mar 9, 2023
1326207 · Mar 9, 2023

History

3 Commits
Mar 8, 2023
Mar 9, 2023
Mar 8, 2023
Mar 9, 2023
Mar 9, 2023
Mar 8, 2023
Mar 8, 2023
Mar 8, 2023
Mar 9, 2023

Repository files navigation

vite-vue-express-example

Embed Vite + Vue in Express with HMR

Overview

This example runs both Express and Vite + Vue in a single node process, with HMR for live updates in development. Server-rendered pages are supported via Nunjucks templating as well.

Run in development mode

Install dependencies and then start. Edit src/client/components/HelloWorld.vue to see live updates in action.

npm ci
NODE_ENV=dev npm start

In production

Build production assets into dist/, and then start

npm run build
NODE_ENV=production npm start