Skip to content

Commit

Permalink
Update struct
Browse files Browse the repository at this point in the history
  • Loading branch information
willybrauner committed Feb 27, 2024
1 parent 9bf711c commit 65a470d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/front/.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### BASE
# base start & end with slash: /{base}/
VITE_APP_BASE=/_libs_cher-ami/chersite/apps/front/dist/spa/
VITE_APP_BASE=/
# protocol for server: http or https (default: http)
PROTOCOL=http

Expand Down
5 changes: 2 additions & 3 deletions apps/front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
"build:ssr-server": "vite build --ssr src/index-server.tsx --outDir dist/ssr/server",
"build:ssr": "npm run build:ssr-scripts && npm run build:ssr-client && npm run build:ssr-server",
"build:static-scripts": "vite build -c vite.static-scripts.config.ts",
"build:static-client": "vite build --outDir dist/static",
"build:static": "npm run build:static-scripts && npm run build:static-client && node dist/scripts/exe-prerender.js",
"build:static-client": "vite build --outDir dist/static/client",
"build:static": "npm run build:static-scripts && npm run build:static-client && node dist/static/scripts/exe-prerender.js",
"generate": "node dist/_scripts/exe-prerender.js",
"build": "npm run build:spa && npm run build:ssr && npm run build:static",
"preview": "serve dist/static",
"start": "cross-env NODE_ENV=production node dist/ssr/scripts/server.prod.js",
"test:watch": "vitest",
"test": "vitest run"
Expand Down
3 changes: 2 additions & 1 deletion apps/front/prerender/exe-prerender-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import express from "express"
import { prerender } from "./prerender"
import chalk from "chalk"
import { fetchAvailableUrls } from "./urls"
import config from "../config/config"

const port = "1234"
const app = express()
Expand All @@ -22,7 +23,7 @@ app.get("/generate", async (req, res) => {

// second arg "./static" is matching cher-ami deploy conf
// need to be edited if we want to start this server locally
await prerender(urlsArray, "./static")
await prerender(urlsArray, config.outDirStaticClient)
res?.send("Generated static pages: " + urlsArray.join(", "))
})

Expand Down

0 comments on commit 65a470d

Please sign in to comment.