Skip to content

Latest commit

 

History

History
116 lines (81 loc) · 2.22 KB

README.md

File metadata and controls

116 lines (81 loc) · 2.22 KB

Description

Transfert Files enables you to copy files from a desktop or a mobile device to a destination desktop machine in the same network. The server runs in the destination desktop machine. The project has a client UI to upload files to the server via multipart/form-data post requests.

Built with

Server

Client

Installation

  1. clone the repository
git clone https://github.com/ayoub-g/transfert-files.git
  1. cd to the server folder
cd transfert-files/server
  1. install npm dependencies
npm install
  1. update destination directories in the file config.json
{
  "_comment": "update destination directories here",
  "storage": {
    "volume": "/Volumes/drive/media",
    "imagesPath": "/images",
    "videosPath": "/videos"
  }
}
  1. Now we have to configure the UI so we can upload files from another device to the server

The project comes with the pre-built angular UI in the public folder, to be able to upload files from another device/desktop, we have to setup the server IP. To do this without rebuilding the angular project, I have externalized the IP configuration in the file public/assets/config.json. update it to the address of the server

cd ..
{
  "_comment_": "update server ip here",
  "server": "http://192.168.x.x:3000"
}
  1. run the server
npm start
  1. finally open a new tab at http://localhost:3000 from the server, or http://192.168.x.x:3000 from your device

  2. continue if you want to update the UI or rebuild it

cd frontend
  1. install npm dependencies
npm install
  1. in the dev mode, if you want to change the server port, go to the proxy.conf.json file
{
  "/server": {
    "target": "http://localhost:3000"
  }
}
  1. run the project
npm start
  1. open a new tab at http://localhost:4200

Credits

Project icon