NexusV1 commited on
Commit
c330b87
·
verified ·
1 Parent(s): e2f79e7

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +5 -0
index.js CHANGED
@@ -14,7 +14,12 @@ const upload = multer({ dest: 'uploads/' });
14
  // Load or initialize DB
15
  let db = fs.existsSync(DATA_FILE) ? JSON.parse(fs.readFileSync(DATA_FILE)) : {};
16
  fs.ensureFileSync(DATA_FILE);
 
17
 
 
 
 
 
18
  // ⏫ Upload to Litterbox
19
  async function uploadToLitterbox(filepath, originalname) {
20
  const formData = new FormData();
 
14
  // Load or initialize DB
15
  let db = fs.existsSync(DATA_FILE) ? JSON.parse(fs.readFileSync(DATA_FILE)) : {};
16
  fs.ensureFileSync(DATA_FILE);
17
+ app.use(express.static(path.join(__dirname, 'public')));
18
 
19
+ // Optional: Serve index.html at root
20
+ app.get('/', (req, res) => {
21
+ res.sendFile(path.join(__dirname, 'public/index.html'));
22
+ });
23
  // ⏫ Upload to Litterbox
24
  async function uploadToLitterbox(filepath, originalname) {
25
  const formData = new FormData();