https://github.com/templates-ecosystem/template-vike-solid-daisyui-hono
Template for Vike + Solid + DaisyUI + Hono
https://github.com/templates-ecosystem/template-vike-solid-daisyui-hono
daisyui eslint hono solid ssr tailwindcss template typescript vike vite yarn yarn-berry
Last synced: 29 days ago
JSON representation
Template for Vike + Solid + DaisyUI + Hono
- Host: GitHub
- URL: https://github.com/templates-ecosystem/template-vike-solid-daisyui-hono
- Owner: templates-ecosystem
- Created: 2024-12-07T13:06:20.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2025-03-25T16:25:41.000Z (about 1 month ago)
- Last Synced: 2025-03-25T16:43:50.660Z (about 1 month ago)
- Topics: daisyui, eslint, hono, solid, ssr, tailwindcss, template, typescript, vike, vite, yarn, yarn-berry
- Language: TypeScript
- Homepage:
- Size: 2.92 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# template-vike-solid-daisyui-hono
### 📚 Template stack
- **Vike**
- **Solid**
- **DaisyUI**
- **Hono**
- **ESLint**
- **TypeScript**### ⬇️ Clone
```sh
git clone https://github.com/templates-ecosystem/template-vike-solid-daisyui-hono.git
```### ⚙️ Install
```sh
yarn
```### 🚀 Start
```sh
yarn dev
```### ▲ Deploy on Vercel
- Create `/api/ssr.js`
```ts
import app from '../dist/server/index.js'export const GET = app.fetch
export const POST = app.fetch
```- Update `/pages/+config.ts`
```diff
import type { Config } from 'vike/types'
import vikeServer from 'vike-server/config'
import vikeSolid from 'vike-solid/config'export default {
...
extends: [
vikeSolid,
vikeServer
],
- server: 'server/index.ts'
+ server: process.env.NODE_ENV === 'production' ? 'server/index.ts' : 'server/entry.node.ts'
} satisfies Config
```- Create `/server/entry.node.ts`
```ts
import { serve } from 'vike-server/hono/serve'import app from './index'
const port = +(process.env.PORT || 3000)
serve(app, { port })
```- Update `/server/index.ts`
```diff
import { Hono } from 'hono'
import { apply } from 'vike-server/hono'
-import { serve } from 'vike-server/hono/serve'const app = new Hono()
apply(app)
-const port = +(process.env.PORT || 3000)
-serve(app, { port })
+export default app
```