Httpserver terminates unexpectedly #19
Labels
No labels
dependencies
javascript
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quodatum/basex-node#19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 am travelling at the moment but hope to look at this in the next few days. Which version of node are you using?
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 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: