Giter VIP home page Giter VIP logo

Comments (6)

jabbany avatar jabbany commented on June 12, 2024

You need to create a config.json in the directory that you're running the command. There are samples of what it would look like in the docs.

There is no need to edit existing files but do nake sure that you also ran npm install after cloning the repo

from stratumitm.

NikiKaCode avatar NikiKaCode commented on June 12, 2024

@jabbany thank you for reply !
after clone i run in directory npm install , npm update ,
i edit
in docs dir - UnifiedStatsServer.md - change only host + port ;
DebuggingServer.md - add some listen port , edit host+port;
in config dir - rewrite_credentials.sample.json - add wallet , edit host+port;
in main dir
config.sample.json - add wallet , edit host+port;

from stratumitm.

NikiKaCode avatar NikiKaCode commented on June 12, 2024

in lib/config/index.js
is there something to edit in this file ?

var fs = require('fs');

var ConfigReader = (function () {
var ConfigReader = function (defaults) {
this._defaults = {};
};

ConfigReader.prototype.read = function (filename, fallback) {
var config = {};
try {
config = JSON.parse(fs.readFileSync(filename));
} catch (e) {
try {
config = JSON.parse(fs.readFileSync(fallback));
} catch (e) {
throw new Error(
'Both file and fallback config files could not be read! ' +
e.toString());
}
}
// Fill in anything that was not filled
for (var key in this._defaults) {
if (!key in config) {
config[key] = this._defaults[key];
}
}
return config;
};

return ConfigReader;
})();

exports.ConfigReader = ConfigReader;
exports.FALLBACK_CONFIG = {
"ports": [6666],
"logger": {
"mode": "console",
"params": {
"color": true
}
},
"rewriter": "./lib/rewrite/blackhole.js",
"params": {
"log": "all",
}
};

from stratumitm.

jabbany avatar jabbany commented on June 12, 2024

You shouldn't need to edit any js files. Instead you need to copy the json file from the docs with your changes and rename it as config.json. Then put it in the directory you're running the command to start the server.

from stratumitm.

NikiKaCode avatar NikiKaCode commented on June 12, 2024

ok .
I'll try :)

from stratumitm.

NikiKaCode avatar NikiKaCode commented on June 12, 2024

Hi @jabbany ,
i got it .
just in main dir must have both json files - config.json and config.sample.json .
or edit line in server.js
..... Create the log var config = (new confreader.ConfigReader(confreader.FALLBACK_CONFIG)).read('config.json', 'config.sample.json')

from stratumitm.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.