Skip to content

Commit

Permalink
remove storage dir env
Browse files Browse the repository at this point in the history
  • Loading branch information
ufaboy committed Jan 8, 2024
1 parent 9688aaa commit 3edc5ff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ DATABASE_URL="mysql://root:root@localhost:3306/library"
DB_USERNAME=""
DB_PASSWORD=""
CERT_DIR=""
STORAGE_DIR=""
BASE_URL=""
4 changes: 1 addition & 3 deletions src/plugins/static.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import fp from 'fastify-plugin';
import { fastifyStatic } from '@fastify/static';
import path from 'path';

export default fp(async (fastify) => {
const __dirname = process.env.STORAGE_DIR as string
fastify.register(fastifyStatic, {
root: path.join(__dirname, '/storage'),
root: '/app/storage',
});
});

0 comments on commit 3edc5ff

Please sign in to comment.