AaronNGray / vite-express-react-ts-example

React SSR with Typescript, Vite, and Express.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple React SSR with Typescript, Vite, and Express

Copied from https://github.com/PaulieScanlon/simple-react-ssr-vite-express and modded.

A simple example of how to use React with Vite Server-Side Rendering and Express.

Getting Started

npm install

Development

Runs the Development Server: server-dev.js. Dev site available on: http://localhost:4173

npm run dev

Production - Build

Runs x2 scripts from package.json

  1. "build:client"
  2. "build:server"
npm run build

Production - Serve

Runs the Production Server: server-prod.js. Production site available on: http://localhost:5173. Disable JavaScript in your Browser and the page will still render.

npm run serve

About

React SSR with Typescript, Vite, and Express.

License:MIT License


Languages

Language:JavaScript 86.7%Language:HTML 13.3%