This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const os = require("os"); | |
const fs = require("fs"); | |
const path = require("path"); | |
const express = require('express'); | |
const multer = require('multer'); | |
const bodyParser = require('body-parser'); | |
// build/normalize paths | |
const src = path.resolve(os.tmpdir(), "uploads"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dgram = require("dgram"); | |
var client = dgram.createSocket("udp4"); | |
client.on("message", function(data, remote){ | |
let str = data.toString("utf8"); | |
let obj = JSON.parse(str); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const net = require("net"); | |
const ip = require('ip'); | |
const os = require("os"); | |
const cluster = require("cluster"); | |
module.exports = function (seed) { | |
/** | |
* Hash IP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cluster = require("cluster"); | |
const http = require("http"); | |
const os = require("os"); | |
const net = require("net"); | |
const ip = require('ip'); | |
// create seed | |
const seed = (Math.random() * 0xffffffff) | 0; | |
/** |
NewerOlder