beckend / vite-template-solid-ssr

template for SolidJS SSR using Vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vite + SolidJS SSR + TailwindCSS template

Install and usage

# or pnpm install or yarn install
$ npm i
# installs local development SSL certificates, customize settings in .envrc file
$ npm run prepare

Recommended to install

  • direnv - autoloads .envrc and .envrc.local.sh(if executable, and is gitignored for local customizations)

Useful scripts

In the project directory, you can run:

npm scripts

dev:ssr

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.

dev:ssr-production

Same as dev:ssr but will build production bundles

build

Builds the app for production to the dist folder.


Deployment

You can deploy the dist folder to any static host.


Information

  • TailwindCSS in jit mode
  • Uses fastify
  • Client related files => src/client, server => src/server

Environment information

  • Development has valid local signed SSL certificate using mkcert running the script npm run prepare, this will pass for major web browsers.
  • Production will have no SSL since normally you have a load balancer which terminates SSL.

Learn more on the Solid Website

About

template for SolidJS SSR using Vite


Languages

Language:TypeScript 82.4%Language:CSS 11.9%Language:JavaScript 4.5%Language:HTML 1.2%