Quick and easy file server

January 24, 2023

Sometimes you need a quick and easy way to serve files on your network without setting up a file share or authentification.

To do so, you can use an npm package called serve: https://www.npmjs.com/package/serve

Requirements :

You will need Node.js and npm. If not installed on your machine, follow the instructions for your platform : https://nodejs.org/en/download/

You can verify Node.js and npm are installed by running the commands :

node -v
npm -v

Installation :

npm install --global serve

Once installed, if you want to serve (share) your downloads folder for example, it is as simple as :

serve ~/Downloads

🎉 Et voilà 🎉

You must be cautious of the folders you are sharing and the network on which you are sharing them. Running serve on your root folder would expose your ~/.ssh folder for example...


Profile picture

Written by Olivier Bonnet who lives and works in Montreal writing a blog that nobody reads 🤪...

© Bonneto 2024