mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-26 09:51:09 +00:00
dbg
This commit is contained in:
parent
c5a2e9d353
commit
348b251bf3
1 changed files with 3 additions and 0 deletions
|
@ -6,6 +6,7 @@ use ibis_lib::frontend::error::MyResult;
|
||||||
use reqwest::ClientBuilder;
|
use reqwest::ClientBuilder;
|
||||||
use std::env::current_dir;
|
use std::env::current_dir;
|
||||||
use std::fs::{create_dir_all, remove_dir_all};
|
use std::fs::{create_dir_all, remove_dir_all};
|
||||||
|
use std::net::ToSocketAddrs;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::process::{Command, Stdio};
|
use std::process::{Command, Stdio};
|
||||||
use std::sync::atomic::{AtomicI32, Ordering};
|
use std::sync::atomic::{AtomicI32, Ordering};
|
||||||
|
@ -107,6 +108,7 @@ impl IbisInstance {
|
||||||
async fn start(db_path: String, port: i32, username: &str) -> Self {
|
async fn start(db_path: String, port: i32, username: &str) -> Self {
|
||||||
let database_url = format!("postgresql://ibis:password@/ibis?host={db_path}");
|
let database_url = format!("postgresql://ibis:password@/ibis?host={db_path}");
|
||||||
let hostname = format!("127.0.0.1:{port}");
|
let hostname = format!("127.0.0.1:{port}");
|
||||||
|
dbg!(&hostname);
|
||||||
let bind = format!("127.0.0.1:{port}").parse().unwrap();
|
let bind = format!("127.0.0.1:{port}").parse().unwrap();
|
||||||
let config = IbisConfig {
|
let config = IbisConfig {
|
||||||
bind,
|
bind,
|
||||||
|
@ -129,6 +131,7 @@ impl IbisInstance {
|
||||||
};
|
};
|
||||||
let client = ClientBuilder::new().cookie_store(true).build().unwrap();
|
let client = ClientBuilder::new().cookie_store(true).build().unwrap();
|
||||||
let api_client = ApiClient::new(client, hostname.clone());
|
let api_client = ApiClient::new(client, hostname.clone());
|
||||||
|
dbg!("do register");
|
||||||
api_client.register(form).await.unwrap();
|
api_client.register(form).await.unwrap();
|
||||||
Self {
|
Self {
|
||||||
api_client,
|
api_client,
|
||||||
|
|
Loading…
Reference in a new issue