File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed
Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ < h1 > Hello i'm html in the root directory</ h1 >
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ app.set('view engine', 'jade');
66app . use ( express . static ( __dirname + '/public' ) ) ;
77
88
9+
10+
11+
12+
913 app . get ( '/' , function ( req , res ) {
1014 messagebird . balance . read ( function ( err , response ) {
1115 if ( err ) {
@@ -21,6 +25,20 @@ app.use(express.static(__dirname + '/public'));
2125 } ) ;
2226 } ) ;
2327
28+ // I now know how to send html from expressjs
29+ // here is the code below
30+
31+ // app.get('/',function(req,res) {
32+ // messagebird.balance.read(function (err, response) {
33+ // if (err) {
34+ // console.log(err);
35+ // } else
36+ // // res.render({balance:response.amount, type:response.type});
37+ // res.sendFile(__dirname + '/views/index.html', {
38+ // // type:response.type
39+ // balance:response.amount,
40+ // type:response.type
41+
2442
2543
2644app . listen ( 3000 , function ( ) {
Original file line number Diff line number Diff line change 1+ < h1 > Hello world I'm html file in the views directory</ h1 >
You can’t perform that action at this time.
0 commit comments