hello i want to open a file (pdf,docx) in the browser with nodejs ,can any one help me out please . for example with php i'can do it like bellow a : $doc = Document::findOrFail($id);
        $path = Storage::disk('local')->getDriver()->getAdapter()->applyPathPrefix($doc->file);
        $type = $doc->mimetype;

       Log::addToLog('Document ID '.$id.' à été consulté');

        if ($type == 'application/pdf' || $type == 'image/jpeg' ||
            $type == 'image/png' || $type == 'image/jpg' || $type == 'image/gif')
        {
            return response()->file($path, ['Content-Type' => $type]);
        }
        elseif ($type == 'video/mp4' || $type == 'audio/mpeg' ||
            $type == 'audio/mp3' || $type == 'audio/x-m4a')
        {
            return view('documents.play',compact('doc'));
        }
        else {
            return response()->file($path, ['Content-Type' => $type]);
        }


    }