-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
37 lines (24 loc) · 849 Bytes
/
server.js
File metadata and controls
37 lines (24 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var express = require('express'),
sprintf = require('locutus/php/strings/sprintf'),
echo = require('locutus/php/strings/echo'),
ucwords = require('locutus/php/strings/ucwords'),
effectiveness = 'futile',
app = express();
messagebird = require('messagebird')('test_jfX7IFLu07gSea3nBwlkDMJvZ');
app.set('view engine', 'ejs');
app.use(express.static(__dirname + '/public'));
app.get('/',function(req,res) {
messagebird.balance.read(function (err, response) {
if (err) {
console.log(err);
} else
res.render('index', {
balance:response.amount,
type:response.type,
method:response.payment
});
});
});
app.listen(3000, function () {
console.log('ReadyUp');
});