-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfakecode-server.js
More file actions
34 lines (26 loc) · 846 Bytes
/
fakecode-server.js
File metadata and controls
34 lines (26 loc) · 846 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
var http = require('http');
var url = require('url');
var fs = require('fs');
var _ = require("underscore");
var express = require('express');
var app = express.createServer();
app.use(express.static(__dirname + '/public'));
fs.writeFileSync(__dirname + '/fakecode-server.pid', process.pid.toString(), 'ascii');
app.get('/fakecode', function(req, res) {
console.log([ 'fakecode', req.query.code ]);
var mobile = "";
if(req.query.code=="C57AZZ1") {
mobile="13963632525";
}else if(req.query.code=="C57AZZ0") {
mobile="13955882233";
}
res.send(mobile);
});
app.listen(8101);
console.log('Fakecode Server Port(8101) Started ' + new Date().toLocaleString());
process.on('uncaughtException', function(e){
console.log(['uncaughtException:', e]);
});
process.on('exit',function(){
console.log("Exit Fackecode Server.");
});