Фронт и бэк: кое-что поменяно
This commit is contained in:
parent
1f1ec5f961
commit
ba4ce2f275
@ -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
|
||||
}
|
@ -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,
|
||||
|
@ -420,4 +420,4 @@ def admin():
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run()
|
||||
app.run(host='0.0.0.0', port='5000')
|
||||
|
Loading…
Reference in New Issue
Block a user