markushedvall / node-plantuml

A Node.js module and CLI for running PlantUML
MIT License
189 stars 53 forks source link

Nailgun problem #4

Closed petrockblog closed 8 years ago

petrockblog commented 8 years ago

When I run the example code

var express = require('express');
var plantuml = require('node-plantuml');

var app = express();

plantuml.useNailgun(); // Activate the usage of Nailgun 

app.get('/png/:uml', function(req, res) {
  res.set('Content-Type', 'image/png');

  var decode = plantuml.decode(req.params.uml);
  var gen = plantuml.generate({format: 'png'});

  decode.out.pipe(gen.in);
  gen.out.pipe(res);
});

app.listen(8080);

and open the URL http://localhost:8080/png/UDfpLD2rKt0200GS0Iy0 nothing happens. If I comment out the line plantuml.useNailgun(); the diagram image is created as expected. node -v yields v0.12.2 for my installation.

I used node-inspector to step through the plantuml-executor functions, but I realized that I am not sure were to specifically look at. Could you give me a direction where to look at or what I could check? .

markushedvall commented 8 years ago

Thanks for informing me about this issue.

Actually it seems I have the same problem when I try to reproduce it. It seems something has been changed/broken when using nailgun.

I'll look into it and keep you informed.

petrockblog commented 8 years ago

Great, thanks!

markushedvall commented 8 years ago

There was a problem with the nails used for nailgun, where the nail for decoding was blocking the nail generating the diagram. This should be fixed now in the 0.4.3 release.

Tell me how it works for you with the new release.

petrockblog commented 8 years ago

I tested the 0.4.3 release and things are working now! I am impressed about the decreased processing time - thanks a lot for the quick reply!

If you are interested, you can see node-plantuml with railgun usage in action at http://www.texwriting.com/uml/new.

markushedvall commented 8 years ago

I'm happy it's working fine for you. Thanks for showing me, It's nice to see it in action!