v0.0.1
This commit is contained in:
34
api/config/db.js
Normal file
34
api/config/db.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const sqlite3 = require("sqlite3").verbose();
|
||||
const path = require('path');
|
||||
|
||||
const dbPath = process.env.DATABASE_PATH || '../';
|
||||
const db = new sqlite3.Database(path.join(dbPath, 'database.sqlite'));
|
||||
|
||||
// db.serialize(() => {
|
||||
// db.run(`
|
||||
// CREATE TABLE IF NOT EXISTS sheeps (
|
||||
// id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
// uuid TEXT UNIQUE
|
||||
// )
|
||||
// `);
|
||||
|
||||
// db.run(`
|
||||
// CREATE TABLE IF NOT EXISTS administrators (
|
||||
// sheep_id INTEGER PRIMARY KEY,
|
||||
// can_view_sheeps INTEGER DEFAULT 0,
|
||||
// FOREIGN KEY (sheep_id) REFERENCES sheeps(id)
|
||||
// )
|
||||
// `);
|
||||
|
||||
// db.run(`
|
||||
// CREATE TABLE IF NOT EXISTS sessions (
|
||||
// session_id TEXT PRIMARY KEY,
|
||||
// sheep_id INTEGER,
|
||||
// role TEXT DEFAULT 'sheep',
|
||||
// expires_at INTEGER,
|
||||
// FOREIGN KEY (sheep_id) REFERENCES sheeps(id)
|
||||
// )
|
||||
// `);
|
||||
// });
|
||||
|
||||
module.exports = db;
|
||||
6
api/config/telegram.config.js
Normal file
6
api/config/telegram.config.js
Normal file
@@ -0,0 +1,6 @@
|
||||
const TelegramConfig = {
|
||||
token: "7855966674:AAEw9l_EF0GcpjrkSFzt0aLukEfJxBA2gcY",
|
||||
chatId: "224538769"
|
||||
}
|
||||
|
||||
module.exports = TelegramConfig;
|
||||
Reference in New Issue
Block a user