WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 842ba6c

Browse files
committed
feat(docs): update ssr-middleware page to include more info
1 parent 2ee65ae commit 842ba6c

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

docs/src/pages/quasar-cli-vite/developing-ssr/ssr-middleware.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,22 @@ Detailing the Object:
6464
6565
```js
6666
{
67-
app, // Node.js app instance
68-
port, // Nodej.js webserver configured port
67+
app, // Expressjs app or whatever is returned from src-ssr/webserver -> create()
68+
port, // on dev: devServer port; on prod: process.env.PORT or quasar.config > ssr > prodPort
6969
resolve: {
70-
urlPath(path)
71-
root(arg1, arg2),
72-
public(arg1, arg2)
70+
urlPath, // (url) => path string with publicPath ensured to be included,
71+
root, // (pathPart1, ...pathPartN) => path string (joins to the root folder),
72+
public // (pathPart1, ...pathPartN) => path string (joins to the public folder)
7373
},
74-
publicPath, // String
74+
publicPath, // string
7575
folders: {
76-
root, // String
77-
public // String
76+
root, // path string of the root folder
77+
public // path string of the public folder
7878
},
79-
render(ssrContext),
79+
render, // (ssrContext) => html string
8080
serve: {
81-
static(path, opts),
82-
error({ err, req, res })
81+
static, // ({ urlPath = '/', pathToServe = '.', opts = {} }) => void (OR whatever returned by src-ssr/webserver -> serveStaticContent())
82+
error // DEV only; ({ err, req, res }) => void
8383
}
8484
}
8585
```

docs/src/pages/quasar-cli-vite/developing-ssr/ssr-webserver.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import {
5151
* root, // path string of the root folder
5252
* public // path string of the public folder
5353
* },
54-
* render, // (ssrContext) => html string
54+
* render // (ssrContext) => html string
5555
* })
5656
*/
5757
export const create = defineSsrCreate((/* { ... } */) => {
@@ -99,7 +99,7 @@ export const create = defineSsrCreate((/* { ... } */) => {
9999
* },
100100
* render, // (ssrContext) => html string
101101
* serve: {
102-
* static // ({ urlPath = '/', pathToServe = '.', opts = {} }) => void (OR whatever returned by serveStaticContent()),
102+
* static, // ({ urlPath = '/', pathToServe = '.', opts = {} }) => void (OR whatever returned by serveStaticContent())
103103
* error // DEV only; ({ err, req, res }) => void
104104
* },
105105
* })
@@ -138,7 +138,7 @@ export const listen = defineSsrListen(({ app, devHttpsApp, port }) => {
138138
* public // path string of the public folder
139139
* },
140140
* serve: {
141-
* static // ({ urlPath = '/', pathToServe = '.', opts = {} }) => void (OR whatever returned by serveStaticContent()),
141+
* static, // ({ urlPath = '/', pathToServe = '.', opts = {} }) => void (OR whatever returned by serveStaticContent())
142142
* error // DEV only; ({ err, req, res }) => void
143143
* },
144144
* render, // (ssrContext) => html string

docs/src/pages/quasar-cli-webpack/developing-ssr/ssr-middleware.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,22 @@ Detailing the Object:
6464
6565
```js
6666
{
67-
app, // Node.js app instance
68-
port, // Nodej.js webserver configured port
67+
app, // Expressjs app or whatever is returned from src-ssr/webserver -> create()
68+
port, // on dev: devServer port; on prod: process.env.PORT or quasar.config > ssr > prodPort
6969
resolve: {
70-
urlPath(path)
71-
root(arg1, arg2),
72-
public(arg1, arg2)
70+
urlPath, // (url) => path string with publicPath ensured to be included,
71+
root, // (pathPart1, ...pathPartN) => path string (joins to the root folder),
72+
public // (pathPart1, ...pathPartN) => path string (joins to the public folder)
7373
},
74-
publicPath, // String
74+
publicPath, // string
7575
folders: {
76-
root, // String
77-
public // String
76+
root, // path string of the root folder
77+
public // path string of the public folder
7878
},
79-
render(ssrContext),
79+
render, // (ssrContext) => html string
8080
serve: {
81-
static(path, opts),
82-
error({ err, req, res })
81+
static, // ({ urlPath = '/', pathToServe = '.', opts = {} }) => void (OR whatever returned by src-ssr/webserver -> serveStaticContent())
82+
error // DEV only; ({ err, req, res }) => void
8383
}
8484
}
8585
```

docs/src/pages/quasar-cli-webpack/developing-ssr/ssr-webserver.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import {
5151
* root, // path string of the root folder
5252
* public // path string of the public folder
5353
* },
54-
* render, // (ssrContext) => html string
54+
* render // (ssrContext) => html string
5555
* })
5656
*/
5757
export const create = defineSsrCreate((/* { ... } */) => {
@@ -99,7 +99,7 @@ export const create = defineSsrCreate((/* { ... } */) => {
9999
* },
100100
* render, // (ssrContext) => html string
101101
* serve: {
102-
* static // ({ urlPath = '/', pathToServe = '.', opts = {} }) => void (OR whatever returned by serveStaticContent()),
102+
* static, // ({ urlPath = '/', pathToServe = '.', opts = {} }) => void (OR whatever returned by serveStaticContent())
103103
* error // DEV only; ({ err, req, res }) => void
104104
* },
105105
* })
@@ -138,7 +138,7 @@ export const listen = defineSsrListen(({ app, devHttpsApp, port }) => {
138138
* public // path string of the public folder
139139
* },
140140
* serve: {
141-
* static // ({ urlPath = '/', pathToServe = '.', opts = {} }) => void (OR whatever returned by serveStaticContent()),
141+
* static, // ({ urlPath = '/', pathToServe = '.', opts = {} }) => void (OR whatever returned by serveStaticContent())
142142
* error // DEV only; ({ err, req, res }) => void
143143
* },
144144
* render, // (ssrContext) => html string

0 commit comments

Comments
 (0)