Merge branch 'no-ssr'

This commit is contained in:
Yanick Champoux 2024-02-04 13:06:44 -05:00
commit 90ce6afc8e
6 changed files with 41 additions and 4 deletions

View File

@ -0,0 +1,5 @@
---
"ottawa-boardgame-sell-bgg": minor
---
feat: make the app browser-only (no ssr)

View File

@ -6,6 +6,14 @@ vars:
GREETING: Hello, World! GREETING: Hello, World!
tasks: tasks:
deploy:
deps: [build]
cmds:
- rsync -av build/ bggsell@gilgamesh:public_html
build:
cmds:
- vite build
update-game: update-game:
cmds: cmds:
- node src/scripts/updateUsers.js - node src/scripts/updateUsers.js

View File

@ -0,0 +1,20 @@
server {
listen 443;
listen [::]:443;
ssl_certificate /etc/lego/certificates/_.babyl.ca.crt;
ssl_certificate_key /etc/lego/certificates/_.babyl.ca.key;
server_name bgg.babyl.ca;
access_log /var/log/nginx/bgg.log;
error_log /var/log/nginx/bgg-error.log;
client_max_body_size 10M;
root /home/bggsell/public_html;
index index.html;
location / {
try_files $uri $uri/ $uri.html /index.html =404;
}
}

View File

@ -35,6 +35,7 @@
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"@sveltejs/adapter-node": "^4.0.1", "@sveltejs/adapter-node": "^4.0.1",
"@sveltejs/adapter-static": "^3.0.1",
"@vincjo/datatables": "^1.14.4", "@vincjo/datatables": "^1.14.4",
"beercss": "^3.4.13", "beercss": "^3.4.13",
"better-sqlite3": "^9.3.0", "better-sqlite3": "^9.3.0",

1
src/routes/+layout.js Normal file
View File

@ -0,0 +1 @@
export const prerender = true;

View File

@ -1,10 +1,12 @@
import adapter from '@sveltejs/adapter-node'; import adapter from '@sveltejs/adapter-static';
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */
const config = { const config = {
kit: { kit: {
adapter: adapter() adapter: adapter({
} fallback: '/index.html',
}),
},
}; };
export default config; export default config;