mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-10 06:23:11 +08:00
Option to open links in the same tab. Api upload icon. Render image icon instead of MDI. Dockerfile client dependencies fix.
This commit is contained in:
8
api.js
8
api.js
@@ -1,15 +1,17 @@
|
||||
const path = require('path');
|
||||
const { join } = require('path');
|
||||
const express = require('express');
|
||||
const errorHandler = require('./middleware/errorHandler');
|
||||
|
||||
const api = express();
|
||||
|
||||
// Static files
|
||||
api.use(express.static(path.join(__dirname, 'public')));
|
||||
api.use(express.static(join(__dirname, 'public')));
|
||||
api.use('/uploads', express.static(join(__dirname, 'data/uploads')));
|
||||
api.get(/^\/(?!api)/, (req, res) => {
|
||||
res.sendFile(path.join(__dirname, 'public/index.html'));
|
||||
res.sendFile(join(__dirname, 'public/index.html'));
|
||||
})
|
||||
|
||||
|
||||
// Body parser
|
||||
api.use(express.json());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user