0
votes
1answer
22 views
Looking for Node.js easy tutorial for a multiplayer game creation (socket.io)
After googling for 2 hours I still havent found and easy Node.JS communicating with javascript tutorial. I would really just like to see a very simple application that for example presses a button and ...
0
votes
0answers
17 views
How do I send email from my Gmail account in my Node.js script?
app.get('/email', function(req,res){
var emailjs = require('emailjs');
var email_server = emailjs.server.connect({
host: 'smtp.gmail.com',
ssl: true,
tls: true,
...
1
vote
1answer
12 views
node - On kill event
Is there a way to run a function when the node.js process is killed?
This is what I'm aiming for (in C):
signal(SIGSEGV, sig_handler);
void sig_handler(int sig) {
if (sig == SIGSEGV) {
...
0
votes
0answers
14 views
Node.js not allowing CA cert from an api?
I keep getting UNABLE_TO_VERIFY_LEAF_SIGNATURE
When I set rejectUnauthorized: false, it connects and makes the request. Then it sends back the correct data.
I am using Node's https request ...
0
votes
2answers
15 views
Where should be located a database config file in Node.js and Express?
I'm now learning Node.js and Express, and want to call mysql module to render multiple unique pages, so instead of writing out var connection=mysql.createConnection({user:'root', password: ...
0
votes
1answer
22 views
Updating file references in a json file via a grunt task
I'm a JavaScript developer and fairly new to creating a build process from scratch. I chose to use Grunt for my current project and have created a GruntFile that does about 90% of what I need it to do ...
0
votes
2answers
32 views
Modules requiring each other cause error “Maximum call stack size exceeded”
I have two different modules that need to require each other. I understand it creates an infinite loop and can't work. Is there a way to circumvent it?
0
votes
1answer
14 views
REST form (like form_for in Ruby) for NodeJS
I have a form for adding videos to the database. I would like to use the same form for editing the videos or creating a new one. In ruby this is easy using scaffolds. But how would I achieve the same ...
0
votes
1answer
14 views
Usage of app.use() in express/connect
I saw sample code on express website:
var express = require('express');
var app = express();
// simple logger
app.use(function(req, res, next){
console.log('%s %s', req.method, req.url);
next();
...
0
votes
1answer
22 views
Node.js and zmq
I have a strange issue with a basic pubsub application with node and zmq:
a client is publishing strings to a broker, the problem is that the broker only receives the first line. At network level ...
0
votes
1answer
25 views
can't remove records in mongodb
I'm trying to remove all the records in my mongodb collection. But when I check to see if it is empty all the records are still there.
var database = mongoose.connect('localhost','news');
...
0
votes
1answer
13 views
socket.io error - 'Uncaught, unspecified “error” event.'
I have an error, but I'm not sure what it means or how to debug it. Here's the error:
events.js:74
throw TypeError('Uncaught, unspecified "error" event.');
^
TypeError: ...
0
votes
1answer
49 views
how to force async function to wait until finished
I've seen some similar questions here but none of them seem to be directly related to this. I'm reading a twitter stream and using socket.io to emit it as follows:
stream.on('data', function (data) {
...
-4
votes
0answers
25 views
Convert this crazy minified JS function to PHP for server side execution [closed]
I've grabbed the following sha1 function from our website but need to port it into PHP.
Unfortunately there is something different about this sha1 function, it's not actually sha1!
We need to have ...
0
votes
0answers
21 views
Is there any tools/scripts to help CI for web site development?
I'm looking for a solution to integrate a brunch based app (brunch.io) with an existing Jenkins/Chef based CI environment. Source code of the brunch app is stored in a git repo. In more details I'm ...