EN
Node.js - What is the best way to display directory content using Express.js?
1
answers
5
points
I want to share some files with Node.js (Express.js).
I am looking for the best way to display directory content (directories and files inside).
What is the best solution?
1 answer
7
points
You can use project made by our contributor:
https://github.com/dirask/dirask-tutorials/tree/master/dirask-tutorials-nodejs/directory-browser
Note: version with password protection is avaialble here.
Screenshot:
Installation + Running:
- install Node.js v16
Choose one option: Debian/Ubuntu, Windows v1, Windows v2 - copy project to your computer/server
- install dependecies and build application using Bash script:
./build-app.sh
Note: check this article to know how to install Bash under Windows.
- configure
SHARED_DIRECTORY_PATH
located inbackend/.env
file, - paste own certificates to
backend/
directory or generate new one using:openssl.exe req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj '/CN=localhost'
Note: certificate and his private key are stored in
cert.pem
andkey.pem
files. - run application using Bash script:
./run-app.sh
Note: you can check README.md file also.
0 comments
Add comment