- Node 14+
Create a file at the root level called firebaseConfig.js
$ touch firebaseConfig.js
create a firebase web app configuration from the console and paste the credentials in the newly created file
export const firebaseConfig = {
apiKey: "",
authDomain: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: "",
};
first install the dependencies
$ npm i
then run the project
$ npm run dev
the app will start at http://localhost:3000/
- Press
Start Offer
to create a connection hash - In another browser or tab, paste the connection hash an press
Connect
- If the connection is successful:
- Write a message and press
Send
to send it to the other peer. - Press
Ping
to calculate the transmission time from one peer to another
- Write a message and press