Httpserver terminates unexpectedly #19

Closed
opened 2015-06-15 12:01:39 +01:00 by Werner0 · 3 comments
Werner0 commented 2015-06-15 12:01:39 +01:00 (Migrated from github.com)

Hi,

I want to use TableExample.js to create my own queries to a BaseX server running on my localhost. I can start the BaseX server and run nodejs TableExample.js, but when I try to navigate to localhost:9000 in the web browser I get a server not found error and on the command line the following happens:

Server running at port:9000

http.js:853
throw new TypeError('first argument must be a string or Buffer');
^
TypeError: first argument must be a string or Buffer
at ServerResponse.OutgoingMessage.write (http.js:853:11)
at Object.callback (/home/werner/Desktop/Nodebin/BaseX/node_modules/basex/examples/TableExample.js:33:7)
at onData (/home/werner/Desktop/Nodebin/BaseX/node_modules/basex/index.js:150:20)
at Socket. (/home/werner/Desktop/Nodebin/BaseX/node_modules/basex/index.js:97:18)
at Socket.EventEmitter.emit (events.js:95:17)
at flow (_stream_readable.js:596:9)
at Socket.pipeOnReadable (stream_readable.js:624:5)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable
(_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
werner@werner-Inspiron-3543:~/Desktop/Nodebin/BaseX/node_modules/basex/examples$

Hi, I want to use TableExample.js to create my own queries to a BaseX server running on my localhost. I can start the BaseX server and run _nodejs TableExample.js_, but when I try to navigate to localhost:9000 in the web browser I get a server not found error and on the command line the following happens: Server running at port:9000 http.js:853 throw new TypeError('first argument must be a string or Buffer'); ^ TypeError: first argument must be a string or Buffer at ServerResponse.OutgoingMessage.write (http.js:853:11) at Object.callback (/home/werner/Desktop/Nodebin/BaseX/node_modules/basex/examples/TableExample.js:33:7) at onData (/home/werner/Desktop/Nodebin/BaseX/node_modules/basex/index.js:150:20) at Socket.<anonymous> (/home/werner/Desktop/Nodebin/BaseX/node_modules/basex/index.js:97:18) at Socket.EventEmitter.emit (events.js:95:17) at flow (_stream_readable.js:596:9) at Socket.pipeOnReadable (_stream_readable.js:624:5) at Socket.EventEmitter.emit (events.js:92:17) at emitReadable_ (_stream_readable.js:408:10) at emitReadable (_stream_readable.js:404:5) werner@werner-Inspiron-3543:~/Desktop/Nodebin/BaseX/node_modules/basex/examples$
apb2006 commented 2015-06-18 15:27:14 +01:00 (Migrated from github.com)

Hi I am travelling at the moment but hope to look at this in the next few days. Which version of node are you using?

Hi I am travelling at the moment but hope to look at this in the next few days. Which version of node are you using?
Werner0 commented 2015-06-19 08:24:34 +01:00 (Migrated from github.com)

I'm using v0.10.25 but I had to create a node symlink using sudo ln -s /usr/bin/nodejs /usr/bin/node to be able to use node --version instead of nodejs --version See this discussion: https://www.digitalocean.com/community/questions/ubuntu-repo-nodejs-require-symlink-to-node-to-use-forever

I'm using v0.10.25 but I had to create a node symlink using _sudo ln -s /usr/bin/nodejs /usr/bin/node_ to be able to use _node --version_ instead of _nodejs --version_ See this discussion: https://www.digitalocean.com/community/questions/ubuntu-repo-nodejs-require-symlink-to-node-to-use-forever
apb2006 commented 2015-06-19 21:13:45 +01:00 (Migrated from github.com)

I have had quick look and I think this example was never finished. It is a
bit of a mess. I think it was intended to be a conversion of a basex php
example. I will look at fixing it when I am home next week.
On 19 Jun 2015 08:24, "Werner0" notifications@github.com wrote:

I'm using v0.10.25 but I had to create a node symlink using sudo ln -s
/usr/bin/nodejs /usr/bin/node
to be able to use node --version instead
of nodejs --version See this discussion:
https://www.digitalocean.com/community/questions/ubuntu-repo-nodejs-require-symlink-to-node-to-use-forever


Reply to this email directly or view it on GitHub
https://github.com/apb2006/basex-node/issues/19#issuecomment-113406049.

I have had quick look and I think this example was never finished. It is a bit of a mess. I think it was intended to be a conversion of a basex php example. I will look at fixing it when I am home next week. On 19 Jun 2015 08:24, "Werner0" notifications@github.com wrote: > I'm using v0.10.25 but I had to create a node symlink using _sudo ln -s > /usr/bin/nodejs /usr/bin/node_ to be able to use _node --version_ instead > of _nodejs --version_ See this discussion: > https://www.digitalocean.com/community/questions/ubuntu-repo-nodejs-require-symlink-to-node-to-use-forever > > — > Reply to this email directly or view it on GitHub > https://github.com/apb2006/basex-node/issues/19#issuecomment-113406049.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
quodatum/basex-node#19
No description provided.