1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-18 19:19:36 +02: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:
unknown 2021-06-23 14:15:14 +02:00
parent e3ed429da1
commit 6c067bee31
18 changed files with 214 additions and 13 deletions

8
api.js
View file

@ -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());