Go Back

Lesson 3 || web10 messaging app

messaging + P2P webrtc streaming
  1. make a new repl html, css, js project
  2. copy all of the lesson 3 files into the repl
  3. add your institutions provider, app store registry server, and webRTC server.
  4. do this by setting the variables web10_authenticator web10_registrar, and web10_webRTC
  5. however, you will need to let others create mail to your inbox
  6. to do so, in script.js, uncomment out the whitelist create entry
  7. also, add the url of your github pages site and replit url to the list of cross_origins.
  8. as a user, if you log in and approve, you should be able to write messages!
  9. try sending a message to a classmate. your will need to reload the page to see incoming messages.
  10. finish the deleteMail function, follow the directions in the comments.
  11. check that it works!
  12. we will use webRTC to make it so you won't need to reload the page to see new messages.
  13. uncomment out the wapi.initP2P line that initializes the P2P functionality.
  14. it lets people ping you, to tell you to re read your mail
  15. uncomment out the .then function with wapi.send
  16. now try sending messages, they should instantly load for your friends.
  17. on repl, hit the github branch icon , commit, and push your changes to a new repo named web10-lesson3.
  18. Congratulations! you made your first P2P streaming web10 app!

app not started