This project is a simple peer-to-peer file sharing application. It uses Express for the server, and PeerJS for peer-to-peer networking.
The application consists of two pages:
-
Page A (
http://localhost:8000/a
): This page allows a user to select a file and send it to another user. The file is encrypted before being sent and decrypted after being received. The user can also download the received file. -
Page B (
http://localhost:8000/b
): This page allows a user to receive files from another user. The user can also download the received file.
The application uses a PeerJS server (http://localhost:9000/myapp
) to handle the peer-to-peer connections.
You can run the project either with Docker or with npm.
- Build the Docker image:
docker build -t peer-to-peer-file-sharing .
- Run the Docker container:
docker run -p 8000:8000 peer-to-peer-file-sharing
The application will be available at http://localhost:8000
.
- Install the dependencies:
npm install
- Start the server:
npm start
The application will be available at http://localhost:8000
.