Data dodania Pytanie
2017-06-10 17:06 Does module.exports in node js create a shallow copy or deep copy of the exported objects or functions? »
For example, If I have 2 modules try1.js and try2.js try1.js module.exports.msg = "hello world"; try2.js try1 = require('./try1'); try1.ms...
(2) odpowiedzi
2017-06-10 06:06 app.post cannot run multiple times on node.js »
I'm using node, express, passport with MySQL I made a function which increments the value of a few fields in 2-3 tables. The function is invoked using...
(1) odpowiedzi
2017-06-09 21:06 How to load and update EJS templates using AJAX? »
I'm trying to update or load sections of a website using AJAX and EJS, the desired behaviour of the app is that if a hash is detected for example:#abo...
(0) odpowiedzi
2017-06-09 16:06 Nodejs app throws cannot POST /users with body-parser middleware »
Here's my app.js file. var express = require('express'), bodyParser = require('body-parser'), oauthServer = require('oauth2-server'), ...
(1) odpowiedzi
2017-06-09 15:06 I want to use JQuery in Node.js and EJS but $ is not defined »
I want to use JQuery so I did like this. npm install jquery modify package.json But it still doesn't work. and this is .ejs page <html> &...
(3) odpowiedzi
2017-06-09 14:06 How do I use npm forever-monitor to log to stdout »
I have a simple nodejs docker service. I'm watching stdout in development and logging to AWS cloudwatch in production. I've just added forever-monito...
(1) odpowiedzi
2017-06-09 09:06 Node-simple-schema: Remove invalid properties from object »
How can I filter out/remove the invalid properties of a dirty object, so that I get a clean object that only contains the valid properties with node-s...
(0) odpowiedzi
2017-06-09 07:06 'this' property has value undefined on nodeJS »
I'm still learning JavaScript and when I tried to get an understanding of this behavior, I've got a little confused. One thing that I understand that ...
(2) odpowiedzi
2017-06-09 07:06 Angularjs routing ejs static files in "views" folder from "public" folder of express.js »
Here is my project structure. I am trying to call the ejs file (app > views > list.ejs) which is in "views" folder from the angular routing file (ap...
(3) odpowiedzi
2017-06-08 20:06 firebase.database.ref path syntax in Cloud Functions and Nodejs »
// cloud functions exports.listenOnWrite = functions.database.ref('/foo/{id}').onWrite(event => { console.log("did match...."); }) matches fo...
(1) odpowiedzi
2017-06-08 20:06 How to implement push notification cross-browser? »
I have a web application and I need the user to be able to see wether a notification for them has landed. I want the notification icon to change it's ...
(1) odpowiedzi
2017-06-08 13:06 Auto save server architecture »
I want to save a lengthy form's inputs at the server. But I don't think making db calls on each auto-save action is the best approach to go for. Wha...
(1) odpowiedzi
2017-06-08 09:06 How to Capture data from a query string and add it to a route to filter/sort - asc or desc nodejs mongodb mongoose ejs »
This should be rather a simple one.... I creating a small app using nodejs with mongodb and ejs. I can sort and filter fine when i define the options...
(0) odpowiedzi
2017-06-08 02:06 Looking to grab data from an API and have it build a table using Node/Express »
I'm looking to build a crypto price web app like www.coincap.io or www.coinmarketcap.com ; I initially started hard coding with EJS and then realized ...
(0) odpowiedzi
2017-06-07 23:06 Mongoose connect throwing an warning »
I am writing a mongodb connected app and while connecting to the server like bellow getting a warning like this: Db.prototype.authenticate method ...
(1) odpowiedzi
2017-06-07 22:06 How to test node.js module which returns anonymous function? »
I'm writing small middleware for express.js route, but when I came to unit test this code I stuck, and I don't know how to properly test it using moch...
(1) odpowiedzi
2017-06-07 21:06 Using session in ejs »
I am a newbie in node and express. I want to use cookies / session to notify my ejs once my registration is successful. I dont know which one is a bet...
(1) odpowiedzi
2017-06-07 10:06 Why does Node not read the env var of the current shell? »
As you can see below, I set an environment variable FOO, but when I execute console.log on the next line, it's undefined. If I set it on the same line...
(1) odpowiedzi
2017-06-07 06:06 Error in webpack when compiling for Angular 4 »
Hi being trying to go from working Angular 2 to Angular 4 for 3 days now. Last error I hope. Usual solution ( /angular(\|/)core(\|/)@angular/ ) ...
(0) odpowiedzi
2017-06-06 19:06 Nodejs Express Web APP - Consume API - Token »
I'm new with nodejs and i have a situation. I have a WebApp with nodejs, express and EJS templates and I consume an external API. I have to impletat...
(0) odpowiedzi
2017-06-06 15:06 User profile in isomorphic applications »
I'm currently in the process of adding login, plus a set of advanced features related to login, to a website using React, Redux, Express and Node. For...
(1) odpowiedzi
2017-06-06 13:06 PostgreSQL RETURNING fails with REGEXP_REPLACE »
I'm running PostgreSQL 9.4 and are inserting a lot of records into my database. I use the RETURNING clause for further use after an insert. When I si...
(2) odpowiedzi
2017-06-06 13:06 Generate documentation for node module depdencies »
I would like to know if there is a way to generate a documentation (HTML, txt, whatever) of a node module from its package.json. Let' suppose this is...
(1) odpowiedzi
2017-06-06 11:06 Loading map marker issue in take print »
I am able to point the marker on the map and it is visible on the browser. But when I print the same, the marker isn't visible on the map. Please help...
(1) odpowiedzi
2017-06-06 10:06 KeyCloak-Nodejs-Goes into an infinite loop after returning authorization code and state »
I am setting up Open Id connect for a dummy node application using KeyCloak. I am using the nodejs adapter suggested here in key cloak docs. Here is...
(0) odpowiedzi
2017-06-06 08:06 Issues in posting ejs form data to controller »
i have gone through "http://tanmaysarkar.com/html-form-with-ejs-template-in-nodejs/" this post but i have written my logic in controller i am ...
(1) odpowiedzi
2017-06-05 23:06 content is missing from HTTP Get and Post requests in Express/Mongoose project »
I have the following files. I have a recipe.js file which outlines the Mongoose Schema for a recipe and the comments for a recipe. The code for it goe...
(1) odpowiedzi
2017-06-05 20:06 unable to fetch data from ejs to controller and client side JS »
I am a newbie in node and express. I am working on an app that has a login module. I am able to register a user but am facing some issues while trying...
(2) odpowiedzi
2017-06-05 20:06 express routing triggers: "Can't set headers after they are sent." error »
I am new to Express, and having trouble sending data from backend to front end. Here is what I want to do: I have a Google Map API on the homepage (ho...
(1) odpowiedzi
2017-06-05 19:06 Express.js: res.render() does not send data when wrapped in promise chain »
I recently started refactoring older callback-hell routes to use promises. (Note: the refactor is not complete so some of the following code is ugly) ...
(3) odpowiedzi
2017-06-05 15:06 Testing with node, mocha and chai (should/bdd syntax) »
Context I'm a JavaScript hobbyist, and to take my project to the next level, I'm trying to setup a pipeline in BitBucket that will run my unit tests ...
(1) odpowiedzi
2017-06-05 12:06 Selenium Webdriver Node.js : How to load and execute jQuery code »
i'm using Selenium webdriver & Node.JS for functional testing. i'm trying to use jquery code to do some treatment. First of all , i tried to in...
(0) odpowiedzi
2017-06-04 15:06 "SyntaxError: Unexpected token )" in Node.js »
I keep getting a SyntaxError: Unexpected token )' error for the following code: passport.use( 'local-signup', new LocalStrategy({ usernameF...
(1) odpowiedzi
2017-06-04 15:06 How do I get http headers in React.js »
I've made a request to a React page, and I need to get the headers from the request. I call the page via the URL: http://localhost/dashboard and I ...
(2) odpowiedzi
2017-06-04 13:06 Catastrophic MongoDB + Mongoose production data loss »
I am running a MongoDB in production. Today I woke up to one of my production collection of documents completely deleted. Luckily I have back up data ...
(0) odpowiedzi