Data dodania Pytanie
2017-06-03 16:06 How to run Node Express server and Angular on the same port? »
I am new to Node and Angular. I need to know whether is it possible to run a Node Express app serving as a backend and an Angular frontend on the same...
(2) odpowiedzi
2017-06-03 16:06 node http requests not executed concurrently if made from same browser »
var http = require('http'); http.createServer(function (req, res) { setTimeout(function () { res.write("hello"); res.end(); },...
(1) odpowiedzi
2017-06-03 04:06 Using a function on all elements of a list and awaiting their promises »
Basically what I'm trying to do is, say I have a function, something() that returns a promise and a whole lot of values that I would like to resolve ...
(1) odpowiedzi
2017-06-02 23:06 Race condition in JavaScript with compound assignment »
I'm not talking about complex race conditions involving the network or events. Rather, I seem to have found out that the += operator is not atomic in ...
(2) odpowiedzi
2017-06-02 14:06 moment.js - Check if two moments are from the same week, but weeks begin on Friday and end on Thursday »
I am creating a Discord bot with node.js and discord.js, and there's a feature that allows users to vote thanks to a command, but I'd like them to vot...
(3) odpowiedzi
2017-06-02 14:06 Algorithm run from within Node HTTP request takes much longer to run »
I have a node app which plots data on an x,y dot plot graph. Currently, I make a GET request from the front end and my back end node server accepts th...
(0) odpowiedzi
2017-06-02 11:06 Property 'body' does not exist on type 'Request' »
The req variable of Request type has no intellisense for property body. Is this due to the typings? import { Request, Response } from 'express' impor...
(2) odpowiedzi
2017-06-02 10:06 EJS include is not a function Error »
On many of my EJS pages I have the following code: <%- include('elements/fbviewpagepixel.ejs') %> It works perfectly fine except on this one ...
(0) odpowiedzi
2017-06-01 19:06 Is necessary to call end after json in node.js? »
In express and node a return a json and after i call end. Is necessary to call res.end() after res.json() ? ...
(3) odpowiedzi
2017-06-01 18:06 Why my middleware is not checking if the email already exists? »
I am authenticating people using passportJS. The problem I have recently realised is the fact that users are able to register for more than one accoun...
(1) odpowiedzi
2017-06-01 08:06 Use AJAX to make a database query on Node.js »
I'm using Node.js as server with Mysql as database for storing logged in usernames. Can I use AJAX to make a sql database query and return the list of...
(1) odpowiedzi
2017-06-01 08:06 Reusing Promise creation »
I'm trying to call the getPromise function with different URLs to return different promise, but getting undefined in second promise's then success fun...
(4) odpowiedzi
2017-06-01 00:06 Alternative ways to parse local JSON file with functional approach? »
Below is the way I usually use to safely parse local JSON data in Node environment, mostly config files and some other relevant data: const fs = requ...
(1) odpowiedzi
2017-06-01 00:06 express validator; error variable not defined within ejs »
I have an issue that I've been trying to figure out for some time now, and was hoping someone may be able to point me in the right direction. My vari...
(1) odpowiedzi
2017-05-31 17:05 How to get EJS to re-render without location.reload() »
I am using ejs in conjunction with nedb for my web app. I am tring to get ejs to re-render its data component without needing to reload the whole DOM....
(0) odpowiedzi
2017-05-31 13:05 Upload file with nodeJS »
I am having trouble uploading a file with nodeJS and Angular. I found solutions but it's only with Ajax which I don't know about. Is it possible to d...
(4) odpowiedzi
2017-05-31 08:05 Nodejs - Rest api call with option --data from a file »
I am making rest api calls from a nodejs application. My curl calls looks like this: curl -X PUT -iv -H "Authorization: bearer <token>" -H "C...
(1) odpowiedzi
2017-05-31 05:05 What state is kept between JavaScript lines? »
I was wondering what states are kept between two lines of JavaScript code submitted to babel-node. My confusion arises because if you write two lines ...
(2) odpowiedzi
2017-05-31 00:05 Exclude package-lock.json from GitHub contribution activity »
Now that npm v5.0.0 is out, using npm packages auto-generates a package-lock.json on npm install. In my case, my package-lock.json file happens to be ...
(1) odpowiedzi
2017-05-30 22:05 Node.js safari push notifications intermittent signature failure »
I am using the safari-push-notifications v 0.3.0 module to create the push package required for Safari. Occasionally I get the error Signature verific...
(1) odpowiedzi
2017-05-30 15:05 Canonical way to run an array of functions in Javascript/Node »
I have found two handy modules called run-parallel and run-series to run arrays functions and return arrays of results. Looking at the little number ...
(3) odpowiedzi
2017-05-30 12:05 How to properly configure Browsersync to proxy backend »
I'm struggling with proper configuration of Browsercync (and maybe some middleware?). My configuration is like: local.example.com it's mine local ad...
(0) odpowiedzi
2017-05-30 12:05 Scraping using NightmareJS with NodeJS »
I'm trying to scrape and save the results into my database. I'm using NodeJS (sails.js framework) This is a working a example using cheerio: getRequ...
(0) odpowiedzi
2017-05-30 00:05 EJS dynamic include »
I am trying to dynamicly include one of my partials, using EJS. I render a template like so: Router router.get('/', noteController.getNotes, (req, r...
(1) odpowiedzi
2017-05-29 23:05 Calculating average value per document with sort »
I have a mongoose model defined as such: freelancerSchema = mongoose.Schema({ _id: { type: String, default: shortid.generate}, fname: String, lnam...
(2) odpowiedzi
2017-05-29 18:05 How to control the flow of applications in NodeJS »
I'm writing my first application in nodeJS. I'm writing a telegram bot, and i was wondering how to control the flow of the application given it asynch...
(2) odpowiedzi
2017-05-29 18:05 Error 'Dom7 is not defined' when starting Framework7 - Vue app with Webpack »
I just follow the instructions in the official website: clone the repo, install node dependencies and run. But once I run the npm run dev command, whe...
(1) odpowiedzi
2017-05-29 16:05 Nodes and mongoose »
How to I render data from multiply collections to ejs view? Example: Route. get('/',function(req,res,){ res.render{ Col1: col1Data, Col2: col2Data ...
(0) odpowiedzi
2017-05-29 10:05 Node.js - PostgresSQL - could not determine data type of parameter $1 error »
I'm trying to create a PostgreSQL prepared statement using node.js pg npm package. However, I keep getting an error: could not determine data typ...
(2) odpowiedzi
2017-05-29 10:05 Full-stack testing: keeping mock and real responses synced »
I tried googling for several hours and could not find an answer to the following question. Is it possible to somehow sync the mock response on the cli...
(0) odpowiedzi
2017-05-28 23:05 How to rollup multiple directories seperately with one output »
So, I have a directory: mods/ -core/ --index.js --scripts/ ---lots of stuff imported by core/index This works with typical rollup fashion if you wa...
(2) odpowiedzi
2017-05-28 21:05 Express node ejs link issues »
I am trying to make a button go to another page which I felt like I knew what I was doing but obviously I am over looking something here. navbar.ejs...
(1) odpowiedzi
2017-05-28 14:05 Communicating TCP with HTTP in Socket.io getting TypeError: Cannot read property 'emit' of undefined »
Trying to communicate TCP server with HTTP server My TCP port is 4040 and HTTP port is 3000 I am working on passing data received on TCP server to H...
(2) odpowiedzi
2017-05-28 13:05 Knex:Error Pool2 - Error: The server does not support SSL connections »
Trying to connect with Postgres Node js and ran into the error Resource Wall is listening on port 8080 Knex:Error Pool2 - Error: The server does no...
(1) odpowiedzi
2017-05-28 02:05 Getting error while running clubbed swift & react-native project on iOS device »
I have an existing project written on swift and I have integrated react native to it everything is working fine on simulator but while running on devi...
(1) odpowiedzi