File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 1
1
import path from 'node:path'
2
2
import process from 'node:process'
3
+ import { URL } from 'node:url'
3
4
4
5
import bodyParser from 'body-parser'
5
6
import cuid from 'cuid'
@@ -14,6 +15,8 @@ import logRequest from '#src/middleware/log-request.js'
14
15
import session from '#src/middleware/session.js'
15
16
import routes from '#src/routes/index.js'
16
17
18
+ const __dirname = new URL ( '.' , import . meta. url ) . pathname
19
+
17
20
const setRequestId = ( req , res , next ) => {
18
21
const requestId = cuid ( )
19
22
res . set ( 'X-RequestId' , requestId )
Original file line number Diff line number Diff line change 1
1
import { defineConfig } from 'vite'
2
2
import vue from '@vitejs/plugin-vue'
3
3
import path from 'path'
4
+ import { URL } from 'node:url'
5
+
6
+ const __dirname = new URL ( '.' , import . meta. url ) . pathname
4
7
5
8
export default defineConfig ( {
6
9
plugins : [ vue ( ) ] ,
You can’t perform that action at this time.
0 commit comments