mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-09-27 19:41:13 -04:00
Database Setup Page (#2738)
* WIP * WIP: Database setup process * Add database setup page
This commit is contained in:
parent
db4663d6be
commit
e4183ee2b7
16 changed files with 513 additions and 59 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue