Skip to content

Commit

Permalink
Updated path to config.json (addon configuration)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpar39 committed Mar 5, 2017
1 parent 4d5ab71 commit 627fdec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.win32.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
python build.py --build_config=release --arch_name=x86 --skip_tests
python build.py --build_config=release --arch_name=x86
pause
3 changes: 2 additions & 1 deletion webapp/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
share/
node_modules/
config.json
addon.node
liblibppp.so
10 changes: 4 additions & 6 deletions webapp/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ try {
var addon = require("./addon");
} catch (err) {
console.log("Error importing addon :(");
console.log(err);
console.log(JSON.stringify(err));
throw err;
}

var pppEngine = new addon.PppWrapper();
console.log('Addon instance created!');

var engineConfigFile = 'share/config.json';
// Read configuration json
// Configure addon engine instance
var engineConfigFile = 'config.json';
var jsonConfig = fs.readFileSync(engineConfigFile, "utf8");

pppEngine.configure(jsonConfig);
console.log('Addon instance configured!');

Expand All @@ -44,7 +44,6 @@ app.get('/', function (req, res) {
res.sendfile('public/index.html', { root: __dirname })
});


// -- Upload input image
app.post('/upload', function (req, res) {

Expand Down Expand Up @@ -185,4 +184,3 @@ var port = process.env.PORT || 3000;
app.listen(port, function () {
console.log("Server listening on port " + port);
});

0 comments on commit 627fdec

Please sign in to comment.