-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
33 lines (29 loc) · 854 Bytes
/
server.js
File metadata and controls
33 lines (29 loc) · 854 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
var express = require('express')
var app = express();
var reqst = require('request');
var conf = require("./config.js");
var user = require("./user.js");
// Basic website stuff
app.use(express.static('.'));
app.engine('html', require('ejs').renderFile);
app.set('views', __dirname);
app.set('view engine', 'html');
// User API
user.followage(app, conf, reqst);
user.followsince(app, conf, reqst);
user.followsinceRaw(app, conf, reqst);
user.age(app, conf, reqst);
user.ageRaw(app, conf, reqst);
user.id(app, conf, reqst);
user.pf(app, conf, reqst);
user.followers(app, conf, reqst);
user.game(app, conf, reqst);
user.title(app, conf, reqst);
user.uptime(app, conf, reqst);
user.viewers(app, conf, reqst);
app.get('/', function(req, res) {
res.render('index.html');
});
app.listen(5000, function () {
console.log('YuciAPI is now up and running')
})