UNPKG

end

Version:

a Realtime BaaS like Firebase by Socket.io and MongoDB

24 lines 696 B
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Create Room</title> <script src="../../client/socket.io.min.js"></script> <script src="../../client/end.js"></script> <script src="js/lib/jquery-1.9.1.min.js"></script> <script src="js/lib/jquery.cookie.js"></script> </head> <body> <button id="create" style="line-height: 50px;font-size: 30px;display: block;margin: 50px auto;"> Create Room </button> <script> $('#create').click(function(){ var chat = new End('chat','http://localhost:8080'); chat.insert({name:'a new room'},function(id){ window.location.href = ("chat.html?"+id); }); }); </script> </body> </html>