Hi,
What are the options for embedded database? I use redis and mongodb for
now, but sometimes you made some small apps, and does not want to mix data
with existing redis db or mongodb. it should be easier to install, now I'm
looking at nosql, https://npmjs.org/package/nosql, also
ejdb,
looks like level db is a good option with all the recommendations, is it
easier to install? it seems depends on some C libs.
On Friday, April 19, 2013 5:13:18 PM UTC+8, Michael Nisi wrote:
Consider LevelDB https://github.com/rvagg/node-levelup
On Fri, Apr 19, 2013 at 10:59 AM, Angelo Chen
://github.com/felixge/node-dirty
On Friday, April 19, 2013 2:59:28 AM UTC-6, Angelo Chen wrote:
Hi,
What are the options for embedded database? I use redis and mongodb for
now, but sometimes you made some small apps, and does not want to mix data
with existing redis db or mongodb
and stringify key and value Buffers prior to
display.
There are a number of Web front-end data grids you could use for the UI.
--
Kevin Swiber
@kevinswiberhttps://github.com/kevinswiber
On Apr 19, 2013, at 10:52 AM, Angelo Chen angelochen...@gmail.com wrote:
Hi Kevin,
I took
have to wrap the function in a db.on('load',
function(rec){}) ?
Angelo
On 4月19日, 下午10时07分, Ben Taber ben.ta...@gmail.com wrote:
There's dirty for super simple
storage:https://github.com/felixge/node-dirty
On Friday, April 19, 2013 2:59:28 AM UTC-6, Angelo Chen wrote:
Hi,
What
Hi,
is there a function nodejs can urldecode a string? Thanks,
Angelo
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To
Hi,
trying out this debug option in the node 0.10.01, a simple test.js
like this:
function hello() {
var x = 1
debugger
console.log(x)
}
hello()
node debug test1.js
cont
i can see it breaks at line debugger, then I do:
print x
but got only three dots: ...
what am I
have to answer my own question, the print command seems not supported
in the debug client of nodejs, following works:
repl
x
then contrl c to go back to the debug mode,
cont
On 3月23日, 上午11时38分, Angelo Chen angelochen...@gmail.com wrote:
Hi,
trying out this debug option in the node 0.10.01
hi,
what is the best way to check if other service is ready(ex:redis)
before:
http.createServer(function(req, res) ? thanks,
angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because
Hi,
is this possible? thanks.
Angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to this group, send email to
Hi,
how to obtain the data after a http.get? following is sample, that gets
only response code:
var http = require('http')
http.get(http://nodejs.org/;, function(res) {
console.log(Got response: + res.statusCode);
}).on('error', function(e) {
console.log(Got error: + e.message);
});
Hi,
Got a very simple http server with following code:
res.writeHead(302, {'Location': 'http://sample.com/})
res.end()
now do a :
curl -i -v http://ip_goes_here:9090/test
it returns:
* Connected to ... port 9090 (#0)
GET /test HTTP/1.1
User-Agent: curl/7.26.0
Host: ...:9090
Accept: */*
hi,
i tried the linux binary file of node in centos 5.x 32 bits, it returns:
./node: /lib/libc.so.6: version `GLIBC_2.9' not found (required by ./node)
./node: /lib/libc.so.6: version `GLIBC_2.6' not found (required by ./node)
./node: /lib/libc.so.6: version `GLIBC_2.7' not found (required by
will old glibc affect node apps? I am using a node compiled from
source, but it does not include npm.
On Nov 19, 11:46 pm, Ben Noordhuis i...@bnoordhuis.nl wrote:
On Mon, Nov 19, 2012 at 12:20 PM, Angelo Chen angelochen...@gmail.com wrote:
hi,
i tried the linux binary file of node
Hi,
in a http server, is there a way to get the locale of the browser
accessing the server? thanks,
Angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the
Hi,
I use following code to redirect to a url:
res.writeHead(302, {
'Location': gotoURL
})
res.end()
this works quite well, but when I called it from a client using
superagent, I got:
{ [Error: getaddrinfo ENOENT] code: 'ENOTFOUND', errno: 'ENOTFOUND',
syscall:
the code works, the client was trying to redirect to a non existent domain,
thus the error, sorry for posting this.
On Monday, November 19, 2012 12:34:47 PM UTC+8, Angelo Chen wrote:
Hi,
I use following code to redirect to a url:
res.writeHead(302, {
'Location': gotoURL
Hi,
var fs = require('fs');
I'd like to understand this a little more, require is part of v8 JS? or
nodejs function? if yes, where can I find it in Nodejs's source code?
thanks,
Angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
...@gmail.com wrote:
This is node.js function. You can start
herehttps://github.com/joyent/node/blob/master/lib/module.js#L361
четверг, 15 ноября 2012 г., 16:17:32 UTC+4 пользователь Angelo Chen написал:
Hi,
var fs = require('fs');
I'd like to understand this a little more, require is part
Hi,
looking at nodejs source code, notice this:
debug('Module._load REQUEST ' + (request) + ' parent: ' + parent.id);
where can i find the doc for debug? thanks,
Angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
Hi,
I was trying to tail a log and send the out put to a connected
browser, i can see the log data in the part of:
tail_child.stdout.on('data', function (data) from console.log, but
the socket.broadcast.emit seems not sending out any data, any way to
make this work? thanks, Angelo
part of
N
is the number of clients connected). If you only had one client connect
you would see the messages 0 times.
On Sat, Nov 10, 2012 at 2:03 AM, Angelo Chen angelo...@gmail.comjavascript:
wrote:
Hi,
I was trying to tail a log and send the out put to a connected
browser, i can see
thanks for the link, that pupergrep gives me some ideas about what I'm
trying to do.
On Nov 10, 6:20 pm, Alex Kocharin a...@kocharin.ru wrote:
Angelo,
see pupergrep ( https://github.com/bobrik/pupergrep ), I think it's does
exactly the same as an app you are trying to implement.
--
//
Hi,
I used to compile nodejs from source in centos, now I got this Linux
build binary, what to do next?
http://nodejs.org/dist/v0.8.14/node-v0.8.14-linux-x64.tar.gz
Thanks,
Angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
пользователь Angelo Chen
написал:
Hi,
have used Redis in a project, now like to save time by using an ORM for
redis in another project, any suggestions? thanks.
Angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting
Hi,
trying to find a quick and dirty solution in nodejs: often need to access a
folder in mac from ipad's Safari, is there a simple, one file nodejs
script that can do it? thanks,
Angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
This works very well, thanks.
if nodejs has a default http - server like this, that will be cool,
wondering why not ? Python got one.
On Monday, October 29, 2012 6:14:06 AM UTC+8, chilts wrote:
On 29 October 2012 00:48, Angelo Chen angelo...@gmail.com javascript:
wrote:
I did some google
Hi,
Is there web based image resizer coded in nodejs? thanks,
Angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups nodejs group.
To post to
this is good, between mongoskin and mongo-lite, difficult to decide.
On Wednesday, August 8, 2012 5:55:46 PM UTC+8, Alexey Petrushin wrote:
MongoDB Driver with simple and compact API, it also eliminates some
callbacks http://alexeypetrushin.github.com/mongo-lite
--
Job Board:
Hi,
looking for for a mongdb client, any suggestions? not so particular
about ORM. thanks,
Angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
looking at mongojs and mongode, too many options for mongdb.
On Aug 7, 2:42 pm, Luca Morettoni l...@morettoni.net wrote:
On Tue, Aug 7, 2012 at 8:30 AM, Angelo Chen angelochen...@gmail.com wrote:
Hi,
looking for for a mongdb client, any suggestions? not so particular
about ORM. thanks
also be called a bug - all valid
XML parsers MUST accept UTF-8 and UTF-16 with valid byte order markers.
Matt.
On Fri, Jul 27, 2012 at 7:14 PM, Angelo Chen angelochen...@gmail.comwrote:
the SAX parser expects a string, so I have to do following to skip the
first 3 bytes:
resp
Hi,
using https to post, and expecting data return is xml, but the first
few bytes are not, the rest is, any idea how to instruct https to
return xml:
Buffer ef bb bf 3c 3f 78 6d 6c 20
thanks,
angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
Hi,
npm install libxmljs, and got error, some idea how to make this work?
thanks.
48 verbose true,/home/info/node_modules,/home/info/node_modules
unbuild libxmljs@0.5.4
149 info postuninstall libxmljs@0.5.4
150 error libxmljs@0.5.4 install: `node-waf configure build`
150 error `sh -c node-waf
How to extract a element from a XML string?
Thanks
On Jul 18, 11:39 pm, Henri Gourvest hgourv...@gmail.com wrote:
Le 18/07/2012 17:34, Angelo Chen a crit : Looks good, is it a pure js?
Yes it is 100% pure js.
Can it support xpath?
No
A sample ?
see readme:https://github.com/hgourvest
On Jul 19, 12:41 am, mscdex msc...@gmail.com wrote:
On Wednesday, July 18, 2012 9:31:19 AM UTC-4, Angelo Chen wrote:
I did and built it, i got v0.8.3-pre.
the compile error with libxmljs go away, but still get errors:
Ok, so do: npm --nodedir /path/to/v0.8/head/you/downloaded install
(/paymentService/reply/error)
would need to say
xmlDoc._root.get(paymentService/reply/error)
Other than that (which is probably an easy patch, but I think they want to
maintain API compatibility with the python source library), it's been fine.
Andrew
On 18 July 2012 07:27, Angelo Chen
07:27, Angelo Chen angelochen...@gmail.com wrote:
Hi,
is there such xml parser exists? js based. my need is simple,
something like this in libxmljs:
xmlDoc = libxmljs.parseXmlString(xml)
s = xmlDoc.get(/paymentService/reply/error)
problem with libxmljs is, difficult to get
Hi,
this works, but why reply is undefined?
rclient.hincrby SERVERS, IP, 1, (reply) -
console.log reply
thanks,
angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this
Hi,
I use swig in my node app, and I know swig uses underscore, do i have
to npm install underscore, or just use the one being used by swig?
i tried to copy the code in swig:
var _ = require('underscore')
but it says:
node.js:201
throw e; // process.nextTick error, or 'error' event
right, thanks.
On Jun 24, 10:10 am, Ryan Schmidt google-2...@ryandesign.com wrote:
On Jun 23, 2012, at 21:04, Angelo Chen wrote:
I use swig in my node app, and I know swig uses underscore, do i have
to npm install underscore, or just use the one being used by swig?
Install your own copy
right, one thing i notice is, when the cpu usage is high, it is the
node that runs forever, not the actual app.js, probably forever is not
the real cpu usage of my app?
On Jun 23, 8:33 am, Oliver Leics oliver.le...@gmail.com wrote:
On Fri, Jun 22, 2012 at 2:54 PM, Angelo Chen angelochen
not sure if it got restarted, but the log file name remain the same.
On Jun 24, 10:29 am, Bradley Meck bradley.m...@gmail.com wrote:
Is your app being restarted in a tight loop during this time?
On Saturday, June 23, 2012 9:16:06 PM UTC-5, Angelo Chen wrote:
right, one thing i notice
Hi,
I run my node with forever, it works quite well, got two questions:
1) at any given time, there are two node running, that's normal?
3) cpu sometimes goes up to 90-100% when the traffic is high, then
goes back to less than 10 quickly, is this normal? is there a way to
check which part goes so
Hi,
is there a way to know how many concurrent connections to a http
server? I use this from command line:
netstat -an --inet |wc
is it a rough estimate of concurrent connections? Thanks,
Angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
it inside your node process, you can use the .connections
property of the server.
if you want to know it outside your node process, i usually use `netstat -an
| grep -c EST` for counting
the actual established connections.
On Tuesday, June 19, 2012 at 4:20 PM, Angelo Chen wrote:
Hi
Hi,
got a code like this:
setInterval(function() {
test_call()
}, 1);
I'd like to exit this interval if certain condition is met, how?
Thanks,
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received
Hi,
I use forever to keep nodejs app running, this works quite well if I
started it from command line:
usr/local/bin/forever start -c /usr/local/bin/node -a -l /home/photos/
logs/resizer.log -o /home/photos/logs/resizer_out.log -e /home/photos/
logs/resizer_err.log
i think i was wrong in using forever to start coffeescript, it should
have been:
forever start -c coffee test.coffee
this works and cpu usage is just the same as node and js.
On Jun 10, 10:03 pm, Angelo Chen angelochen...@gmail.com wrote:
Hi,
i use forever to run a js, cpu usage is very low
Hi,
i use forever to run a js, cpu usage is very low, less than 2%, same
program in coffeescript and run it this way:
forever start test.coffee
cpu went up to 15%
what is a better way to run coffeescript server, compiled first into
js or directly :
coffee app.coffee
--
Job Board:
is the recommended practice.
On Sunday, June 10, 2012 7:03:19 AM UTC-7, Angelo Chen wrote:
Hi,
i use forever to run a js, cpu usage is very low, less than 2%, same
program in coffeescript and run it this way:
forever start test.coffee
cpu went up to 15%
what is a better way to run
correct, thanks.
On Jun 9, 1:25 pm, Ryan Schmidt google-2...@ryandesign.com wrote:
On Jun 9, 2012, at 00:19, Angelo Chen wrote:
In a centos server, I tried this, and get 7:
node
d1 = new Date(Fri, 08 Jun 2012 00:00:00 GMT)
Fri, 08 Jun 2012 00:00:00 GMT
d1.getDate()
7
Hi,
I need to run a function every day, following will work, but it will
be 1 day after the time I started the app, is there a way to set to a
time, say every 1st hour of the day? Thanks
setInterval(function() {
setLogDate()
}, 6);
--
Job Board: http://jobs.nodejs.org/
Posting
Hi,
I'd like to code something in coffeescript for a nodejs project, there
is no need to complete in CS, just some service type modules, and I
searched this group, see a lot of discussions, what I'm looking for is
just a 'hello world' type tutorial that can get me started asap, any
like this?
Hi,
I use redis to store data, how to save the datetime data in redis that
can be easily used later back to javascript?
tried var d = new Date()
s = d.toISOString()
it saves as a string, but Date.parse(s) seems not converting it back
correctly, any hints?
Thanks,
--
Job Board:
one confusing thing for newbies like me:
exports.get_list = function ( cb) {
rclient.smembers(list, function(err, members) {
members.forEach(function(member){
console.log(member)
})
)
})
})
cb(null, 'lst')
})
}
On Mar 20, 6:02 pm, Oliver Leics oliver.le...@gmail.com wrote:
On Tue, Mar 20, 2012 at 10:58 AM, Angelo Chen angelochen...@gmail.com wrote:
the function(member) for 'forEach' is callback, right
the all in 'hgetall' actually means getting all the properties of that
member, so for every member it reads the data in, trying out your
modification, the cb(null, 'lst') was called multiple times.
this is quite a interesting question:
members.forEach(function(member) {
})
cb(null, 'lst‘)
this works, here is the final version, thanks:
exports.get_list = function (cb) {
rclient.smembers(list, function (err, members) {
var len = members.length
members.forEach(function (member) {
console.log(member)
rclient.hgetall(member, function (err, item) {
when a json is json.stringify and parse back to json later, the date
is different:
var d = {id:1, d:new Date()}
//{ id: 1, d: Tue, 20 Mar 2012 23:55:10 GMT }
s = JSON.stringify(d)
//'{id:1,d:2012-03-20T23:55:10.352Z}'
b = JSON.parse(s)
//{ id: 1, d: '2012-03-20T23:55:10.352Z' }
On Mar 21,
Hi,
got this :
function get_next_id() {
rclient.incr(next_id, function(err, reply) {
return reply
});
}
will call this with:
var next_id = get_next_id()
this won't work, because function returns even before 'reply' was
taken from rclient( a redis),
. There are also many vocal proponents of keeping it async and
only using callbacks.
But to answer your question a bit, there is no simple way to avoid
callbacks.
On Sun, Mar 18, 2012 at 5:23 PM, Angelo Chen angelochen...@gmail.comwrote:
Hi,
got this :
function get_next_id
) is a
bit overkill, and horrible for performance.
http://jsperf.com/a-string-is-not-an-error
On Mar 9, 10:36 am, Roly Fentanes roly...@gmail.com wrote:
btwhttp://www.devthought.com/2011/12/22/a-string-is-not-an-error/
On Friday, March 9, 2012 3:30:49 AM UTC-7, Angelo Chen wrote:
Hi
This does bring out another topic, when we need a call back? Any
rule ? In this case the function wii be replaced with a database one
later, so it might have some IO.
On Mar 10, 11:49 pm, Axel Kittenberger axk...@gmail.com wrote:
If your user are not in a particular order, add to this: don't
Hi,
Struggling to change coding practice, following has two samples, which
one is correct? or any other approaches available?
exports.get_user = function (id, func) {
var found = false
for (var i = 0; i users.length; i ++) {
if (users[i].id === id) {
oh, return is cool!
On Mar 9, 7:02 pm, Axel Kittenberger axk...@gmail.com wrote:
Many coders forget that you can use the return statement before the
end of the function. At least most people who finished some coding
course hardly ever do this. It usually simplifies many functions:
hi,
I pipe jpegs from database to browser with following code, if picking
up only one photo, it works perfect, if more than one, then you can
see photos are overlapping each other as one, any idea why that
happens? thanks.
code in route:
exports.get_jpeg = function(req, res){
Hi,
I have small jpegs stored in a database (firebird), what is a good
approach to show those jpegs in a page? Thanks,
Angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are
database and piped to the
browser on the fly. I added in some smart caching to make it faster, but the
same idea works for any data source.
On Tue, Feb 21, 2012 at 3:55 AM, Angelo Chen angelochen...@gmail.com wrote:
Hi,
I have small jpegs stored in a database (firebird), what is a good
:49 AM, Angelo Chen angelochen...@gmail.comwrote:
Hi,
with following upstart script, I can do: /sbin/start testjs and /sbin/
stop testjs, but it will not start when boot up pc, why?
#!upstart
description node.js server
author j
start on startup
stop on shutdown
just notice the instruction 'respawn' , that does the recover
On Feb 19, 3:53 pm, Angelo Chen angelochen...@gmail.com wrote:
Hi,
Always thought we need monit or forever to restart a crashed nodejs
app, but seems to me, upstart actually restarts crashed or killed
apps, only way to stop
Hi,
with following upstart script, I can do: /sbin/start testjs and /sbin/
stop testjs, but it will not start when boot up pc, why?
#!upstart
description node.js server
author j
start on startup
stop on shutdown
script
export HOME=/root
exec /usr/local/bin/node /root/test.js
Hi,
I have a simple nodejs that to be loaded by Monit, this app does not
have http so this will not work:
check host resizer with address 127.0.0.1
if failed port 8080 protocol HTTP
how to check this kind of nodejs app? thanks,
Angelo
--
Job Board: http://jobs.nodejs.org/
Posting
Hi Felix,
Thanks for the reply, the app is only for a local network, not to be
in the public net, need only a simple solution. your kue idea is good,
if i understand it correctly, there will be two node apps:
1) the node web app that accepts file upload, then send over to #2
2) node/kue based
Hi,
how to use coffee-resque in a project? it does not have npm install
option. I tried following:
1. app.js
2. create a node-modules and copy the entire coffee-resque under it
3. in coffee-resque i did a : make generate-js
in the code:
var resque = require('coffee-resque').connect({
host:
Hi,
Is there a sample code that shows how to use coffee-resque? the one in
github seems not enough ? Thanks,
Angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are
a lot from this discussion, thanks again.
Angelo
On Feb 4, 12:57 pm, Angelo Chen angelochen...@gmail.com wrote:
Hi,
I use ExpressJS for file uploading, after that, pass the files to node-
imagemagick to resize, if we got 100 files uploaded, the entire cpu
will be committed to various convert
hi,
trying out with kue:
npm install kue
got :
npm http GET https://registry.npmjs.org/natural/-/natural-0.0.27.tgz
npm http 304 https://registry.npmjs.org/mkdirp/0.0.7
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/growl/1.1.0
npm http 200
, Angelo Chen angelochen...@gmail.comwrote:
hi,
trying out with kue:
npm install kue
got :
npm http GEThttps://registry.npmjs.org/natural/-/natural-0.0.27.tgz
npm http 304https://registry.npmjs.org/mkdirp/0.0.7
npm http 304https://registry.npmjs.org/mime
npm http 304https
Hi,
I have this working if i type it in a command line:
/usr/local/bin/forever start /home/photos/app.js
if I add this to:
/etc/rc.d/rc.local
and restart the computer, it does not start the app, any idea? Thanks,
Angelo
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
80 matches
Mail list logo