You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Creates and starts the default Perseus server using Actix Web. This should be run in a `main()` function annotated with `#[tokio::main]` (which requires the `macros` and
Copy file name to clipboardExpand all lines: packages/perseus/src/server/options.rs
+6-5
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,13 @@ use crate::stores::{ImmutableStore, MutableStore};
6
6
usecrate::template::ArcTemplateMap;
7
7
usecrate::SsrNode;
8
8
use std::collections::HashMap;
9
+
use std::sync::Arc;
9
10
10
11
usesuper::HtmlShell;
11
12
12
13
/// The options for setting up all server integrations. This should be literally constructed, as nothing is optional. If integrations need further properties,
13
-
/// they should expose their own options in addition to these. These should be accessed through an `Arc`/`Rc` for integration developers.
14
-
#[derive(Debug)]
14
+
/// they should expose their own options in addition to these.
15
+
#[derive(Debug,Clone)]
15
16
pubstructServerOptions{
16
17
/// The location on the filesystem of your JavaScript bundle.
17
18
pubjs_bundle:String,
@@ -32,7 +33,7 @@ pub struct ServerOptions {
32
33
/// The location of the JS interop snippets to be served as static files.
33
34
pubsnippets:String,
34
35
/// The error pages for the app. These will be server-rendered if an initial load fails.
35
-
puberror_pages:ErrorPages<SsrNode>,
36
+
puberror_pages:Arc<ErrorPages<SsrNode>>,
36
37
/// The directory to serve static content from, which will be mapped to `/.perseus/static`in the browser.
37
38
pubstatic_dir:Option<String>,
38
39
/// A map of URLs to act as aliases for certain static resources. These are particularly designed for things like a site manifest or
@@ -41,7 +42,7 @@ pub struct ServerOptions {
41
42
}
42
43
43
44
/// The full set of properties that all server integrations take.
0 commit comments