mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-23 06:36:19 +00:00
usar db.db
This commit is contained in:
parent
905d94a55e
commit
5943d80252
7 changed files with 8 additions and 6 deletions
|
@ -2,6 +2,8 @@ data/warcs/
|
|||
data/carrefour/
|
||||
*/*.db*
|
||||
sqlite.db
|
||||
db.db
|
||||
db.db-wal
|
||||
downloader/
|
||||
node_modules/
|
||||
*/node_modules/
|
||||
|
|
|
@ -1 +1 @@
|
|||
DB_PATH=../sqlite.db
|
||||
DB_PATH=../db.db
|
|
@ -1,4 +1,4 @@
|
|||
export const DB_PATH = process.env.DB_PATH ?? "../sqlite.db";
|
||||
export const DB_PATH = process.env.DB_PATH ?? "../db.db";
|
||||
|
||||
/** @type { import("drizzle-kit").Config } */
|
||||
export default {
|
||||
|
|
|
@ -1 +1 @@
|
|||
DATABASE_URL=sqlite://../sqlite.db
|
||||
DATABASE_URL=sqlite://../db.db
|
||||
|
|
|
@ -282,7 +282,7 @@ async fn main() {
|
|||
.connect_with(
|
||||
SqliteConnectOptions::from_str(&format!(
|
||||
"sqlite://{}",
|
||||
env::var("DB_PATH").unwrap_or("../sqlite.db".to_string())
|
||||
env::var("DB_PATH").unwrap_or("../db.db".to_string())
|
||||
))
|
||||
.unwrap()
|
||||
.journal_mode(sqlx::sqlite::SqliteJournalMode::Wal)
|
||||
|
|
|
@ -17,7 +17,7 @@ pub struct Db {
|
|||
|
||||
impl Db {
|
||||
pub async fn connect() -> anyhow::Result<Self> {
|
||||
let db_path = env::var("DB_PATH").unwrap_or("../sqlite.db".to_string());
|
||||
let db_path = env::var("DB_PATH").unwrap_or("../db.db".to_string());
|
||||
info!("Opening DB at {}", db_path);
|
||||
let read_pool = connect_to_db(&db_path, 32).await?;
|
||||
let write_pool = connect_to_db(&db_path, 1).await?;
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
DB_PATH=../sqlite.db
|
||||
DB_PATH=../db.db
|
||||
VITE_API_HOST=http://localhost:8000
|
Loading…
Reference in a new issue