Фронт и бэк: кое-что поменяно

This commit is contained in:
Сергей Полевой 2023-05-18 16:17:52 +04:00
parent 1f1ec5f961
commit ba4ce2f275
3 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@ use backend::endpoints::owner::*;
#[actix_web::main]
async fn main() -> std::io::Result<()> {
let (client, connection) = tokio_postgres::connect(
&format!("host={} user={} password={} dbname={}", dotenv!("HOST"), dotenv!("USER"), dotenv!("PASSWORD"), dotenv!("DBNAMEE")),
&format!("host={} user={} password={} dbname={}", dotenv!("HOST"), dotenv!("USERR"), dotenv!("PASSWORD"), dotenv!("DBNAMEE")),
NoTls
).await.unwrap();
@ -111,7 +111,7 @@ async fn main() -> std::io::Result<()> {
.service(logout)
).service(benchmark)
})
.bind("127.0.0.1:8080")?
.bind("0.0.0.0:8080")?
.run()
.await
}

View File

@ -17,7 +17,7 @@ impl BenchmarkRepository for PostgresBenchmarkRepository {
let start_time = chrono::Utc::now().naive_local();
for n in 1..201 {
for n in 1..2001 {
let str = format!("INSERT INTO Owner(name, surname, middlename, phone) VALUES ('Иван{0}', 'Иванов{0}', 'Иванович{0}', {0}) RETURNING id", n);
let owner_id: i32 = self.connection.query(
&str,

View File

@ -420,4 +420,4 @@ def admin():
if __name__ == '__main__':
app.run()
app.run(host='0.0.0.0', port='5000')