How to send an email with nodemailer on AWS Lambda

I'm calling the following code ( with actual email addresses and passwords ) in my AWS Lambda function. Unfortunately, I'm unable to view the logs (my account currently doesn't have the permissions). Is there any specific permissions I have to set up...
more »

2017-10-04 21:10 (1) Answers

SESSIONS_PER_USER limit with nodejs

I've been struggling with this issue for a couple of weeks: For some reason, our nodejs script which is connecting to a oracle database in another machine started erroring with SESSIONS_PER_USER limit, but we don't have any other connection opened t...
more »

2017-10-04 17:10 (1) Answers

NodeJS async/await class mysql/mariadb

I tried to something I thought would be simple using: nodejs 8.6, MariaDB, MySQL2/promise and classes. But it does not work: Here is the simple example: const mysql = require('mysql2/promise'); class mySQLClass { constructor() { this....
more »

2017-10-04 00:10 (1) Answers

Better understanding of arrays and JSON

I am making a Messenger bot with Node.js and I'm stuck since hours with this problem. Anyways, what I'm trying to do is to make my bot send a Generic Template response to Facebook. I've successfully managed to send a Button Template but this I canno...
more »

2017-10-03 19:10 (0) Answers

Deleting a record using Mongoose with Redux

I want to delete a record in my mongoDB, when a user presses a button for the given record. For reference: I have all my mongoose and redux code set up, but i get this error: This is my action: //deletes a survey when user clicks button expor...
more »

2017-10-03 13:10 (2) Answers

Use fse.readFile() inside .map()

I am trying to read the contents of several files in Node.js using promises. Since the standard fs module does not provide a sufficient promise interface, I decided to use fs-extra instead which provides pretty much the same functions as the default ...
more »

2017-10-02 21:10 (1) Answers

Caching related sequences in node js

I have an app that provides two types of operations : addSequence, matchSequence. addSequence => receives strings array (a1 => a2 => a3 ...) and store it in the database (neo4j) as a tree so that a1 will be the root and so on. when someone add ano...
more »

2017-10-02 12:10 (0) Answers

Communicating between two nodejs application

I have three (nodejs) processes P1, P2, P3. Function A of P1 completes its execution it sends some data to P2. P2 performs its activities and its output should be sent to P3. P3 works on the input sends some acknowledgement data to Function B of...
more »

2017-10-02 05:10 (1) Answers

Node.js Promise reference error

I'm getting a reference error saying check is not defined when I call check().then(function(employees) towards the bottom of my code and I;m not sure why. This happens when I call getAllEmployees(); var employees = []; var departments = []; var err...
more »

2017-10-01 23:10 (3) Answers

How can I use async/await at the top level?

I have been going over async/await and after going over several articles, I decided to test things myself. However, I can't seem to wrap my head around why this does not work: async function main() { var value = await Promise.resolve('Hey ther...
more »

2017-10-01 20:10 (1) Answers

Node.js REST API to fetch data from MongoDB

I'm trying to create a REST API using Node.js that would fetch the last N rows of a MongoDB collection. This is my current code: var express = require("express"); var app = express(); var bodyParser = require("body-parser"); var r...
more »

2017-09-29 20:09 (2) Answers

Android chat with Socket.io, Laravel, and Redis

I m very new to the whole socket stuff using node. What I am trying to achieve is make a chat application using Socket.io on Node Js, with Laravel and Redis. I have followed the documentation for Socket and made a test app. User enters a message, it ...
more »

2017-09-29 06:09 (0) Answers

jsdom get text without image

I am trying to use jsdom to get a description from an article. The html code of the article is <p><img src="http://localhost/bibi_cms/cms/app/images/upload_photo/1506653694941.png" style="width: 599.783px; height: 1066px;"></p> &...
more »

2017-09-29 04:09 (1) Answers

Transactional and Bulk Email Workflow

What are the best practices for using both transactional and marketing email? Currently I am testing Mailgun for transactional email due to their free API which fits my usage, and once scaled, has balanced pricing plans. This is compared to Mandrill...
more »

2017-09-27 16:09 (1) Answers

Caching response for API.ai Node.js webhook

I have a webhook designed in Node.js for API.ai that interacts with multiple API's to gather information and give response to user. Since, I am interacting with multiple API's the response time taken is more than 5 secs which is causing the API.ai r...
more »

2017-09-27 15:09 (1) Answers

Making and changing APIs when online in Nodejs

So were trying to develop an application (or Service) with Node.js that provides each user a custom API that can be called from {theirUserName}.ourwebsite.com. Users will be able to change/edit/remote the endpoints of the API within the application t...
more »

2017-09-26 07:09 (1) Answers