config.rs 925 B

1234567891011121314151617181920
  1. use lazy_static::lazy_static;
  2. pub const HOST: &'static str = "localhost:8000";
  3. pub const SCHEMA: &'static str = "http://";
  4. pub const HEADER_TOKEN: &'static str = "token";
  5. lazy_static! {
  6. pub static ref SIGN_UP_URL: String = format!("{}/{}/api/register", SCHEMA, HOST);
  7. pub static ref SIGN_IN_URL: String = format!("{}/{}/api/auth", SCHEMA, HOST);
  8. pub static ref SIGN_OUT_URL: String = format!("{}/{}/api/auth", SCHEMA, HOST);
  9. pub static ref USER_PROFILE_URL: String = format!("{}/{}/api/user", SCHEMA, HOST);
  10. //
  11. pub static ref WORKSPACE_URL: String = format!("{}/{}/api/workspace", SCHEMA, HOST);
  12. pub static ref APP_URL: String = format!("{}/{}/api/app", SCHEMA, HOST);
  13. pub static ref VIEW_URL: String = format!("{}/{}/api/view", SCHEMA, HOST);
  14. pub static ref DOC_URL: String = format!("{}/{}/api/doc", SCHEMA, HOST);
  15. pub static ref WS_ADDR: String = format!("ws://{}/ws", HOST);
  16. }