File tree 10 files changed +29
-11
lines changed
10 files changed +29
-11
lines changed Original file line number Diff line number Diff line change
1
+ lib-cov
2
+ * .seed
3
+ * .log
4
+ * .csv
5
+ * .dat
6
+ * .out
7
+ * .pid
8
+ * .gz
9
+
10
+ pids
11
+ logs
12
+ results
13
+ build
14
+
15
+ node_modules
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ var app = express();
3
3
var server = require ( 'http' ) . createServer ( app ) ;
4
4
var io = require ( 'socket.io' ) . listen ( server ) ;
5
5
6
- // server.listen(80);
7
- server . listen ( process . env . PORT || 3000 ) ;
6
+ server . listen ( 80 ) ; //for local test
7
+ // server.listen(process.env.PORT || 3000);//for publish to heroku
8
8
9
9
app . use ( "/" , express . static ( __dirname + '/public' ) ) ;
10
10
Original file line number Diff line number Diff line change 1
1
<!DOCTYPE HTML>
2
2
< html >
3
3
< head >
4
- < title > Simple Chat</ title >
5
- < link rel ="stylesheet " type ="text/css " href ="style.css ">
4
+ < title > HiChat</ title >
5
+ < link rel ="stylesheet " type ="text/css " href ="style/app.css ">
6
+ < link rel ="shortcut icon " href ="img/favicon.ico " type ="image/x-icon ">
7
+ < link rel ="icon " href ="img/favicon.ico " type ="image/x-icon ">
6
8
< script type ="text/javascript " src ="/socket.io/socket.io.js "> </ script >
7
9
< script type ="text/javascript " src ="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js "> </ script >
8
- < script type ="text/javascript " src ="chat .js "> </ script >
10
+ < script type ="text/javascript " src ="js/hichat .js "> </ script >
9
11
</ head >
10
12
< body >
11
13
< div id ="wrapper ">
12
- < h1 > Simple Chat </ h1 >
14
+ < h1 > HiChat </ h1 >
13
15
< div id ="messages "> </ div >
14
16
< div class ="nic ">
15
17
Your Name
@@ -18,10 +20,11 @@ <h1>Simple Chat</h1>
18
20
< textarea id ="message "> </ textarea >
19
21
< input id ="send " type ="submit " value ="Send "/>
20
22
</ div >
23
+ < footer > Wayou-a web programmer who has free time |
< a href ="
mailto:[email protected] "
target ="
_blank "
> [email protected] </ a > </ footer >
21
24
< script type ="text/javascript ">
22
25
$ ( document ) . ready ( function ( ) {
23
- // Chat .initialize('http://localhost/');
24
- Chat . initialize ( 'http://hichat.herokuapp.com/' ) ;
26
+ hiChat . initialize ( 'http://localhost/' ) ; //for localhost test
27
+ //hiChat .initialize('http://hichat.herokuapp.com/');//for publish
25
28
} ) ;
26
29
</ script >
27
30
</ body >
Original file line number Diff line number Diff line change 1
1
//Create a chat module to use.
2
2
( function ( ) {
3
- window . Chat = {
3
+ window . hiChat = {
4
4
socket : null ,
5
5
6
6
initialize : function ( socketURL ) {
7
7
this . socket = io . connect ( socketURL ) ;
8
8
9
9
//Send message on button click or enter
10
10
$ ( '#send' ) . click ( function ( ) {
11
- Chat . send ( ) ;
11
+ hiChat . send ( ) ;
12
12
} ) ;
13
13
14
14
$ ( '#message' ) . keyup ( function ( evt ) {
15
15
if ( ( evt . keyCode || evt . which ) == 13 ) {
16
- Chat . send ( ) ;
16
+ hiChat . send ( ) ;
17
17
return false ;
18
18
}
19
19
} ) ;
File renamed without changes.
You can’t perform that action at this time.
0 commit comments