MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / new_with_localhost

Method new_with_localhost

crates/cli/src/config.rs:160–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

158
159impl RawConfig {
160 fn new_with_localhost() -> Self {
161 let local = ServerConfig {
162 host: "127.0.0.1:3000".to_string(),
163 protocol: "http".to_string(),
164 nickname: Some("local".to_string()),
165 ecdsa_public_key: None,
166 };
167 let maincloud = ServerConfig {
168 host: "maincloud.spacetimedb.com".to_string(),
169 protocol: "https".to_string(),
170 nickname: Some("maincloud".to_string()),
171 ecdsa_public_key: None,
172 };
173 RawConfig {
174 default_server: maincloud.nickname.clone(),
175 server_configs: vec![maincloud, local],
176 web_session_token: None,
177 spacetimedb_token: None,
178 listen_addr: None,
179 }
180 }
181
182 fn find_server(&self, name_or_host: &str) -> anyhow::Result<&ServerConfig> {
183 for cfg in &self.server_configs {

Callers

nothing calls this directly

Calls 2

to_stringMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected