mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 12:22:22 +08:00
Database Setup Page (#2738)
* WIP * WIP: Database setup process * Add database setup page
This commit is contained in:
@@ -235,13 +235,13 @@ describe("The function filterAndJoin", () => {
|
||||
|
||||
describe("Test uptimeKumaServer.getClientIP()", () => {
|
||||
it("should able to get a correct client IP", async () => {
|
||||
Database.init({
|
||||
Database.initDataDir({
|
||||
"data-dir": "./data/test"
|
||||
});
|
||||
|
||||
if (! fs.existsSync(Database.path)) {
|
||||
if (! fs.existsSync(Database.sqlitePath)) {
|
||||
log.info("server", "Copying Database");
|
||||
fs.copyFileSync(Database.templatePath, Database.path);
|
||||
fs.copyFileSync(Database.templatePath, Database.sqlitePath);
|
||||
}
|
||||
|
||||
await Database.connect(true);
|
||||
|
Reference in New Issue
Block a user