Automate setting up a cache server

This commit is contained in:
Pieter Vander Vennet 2024-08-19 19:09:16 +02:00
parent 752266ee48
commit 6f85db291a
6 changed files with 297 additions and 123 deletions

View file

@ -0,0 +1,16 @@
import Script from "../Script"
import { OsmPoiDatabase } from "./osmPoiDatabase"
class CreateNewDatabase extends Script {
constructor() {
super("Creates a new version of the database. Usage: `createNewDatabase -- YYYY-MM-DD` which will create database `osm-poi.YYYY-MM-DD`")
}
async main(args: string[]): Promise<void> {
const db = new OsmPoiDatabase("postgresql://user:password@localhost:5444")
await db.createNew(args[0])
}
}
new CreateNewDatabase().run()