Data dodania Pytanie
2017-08-16 20:08 "Users not defined" in node.js »
I'm using EJS as my template engine. My browser says "users" is not definded, but in my server.js file, i've defined it as var users = require("./rout...
(1) odpowiedzi
2017-08-16 15:08 Node.js, how do i take HTML form text input and direct it to a local file »
I am trying to take some very simple text input through a form and direct it to a .txt file. not getting much luck and am way out of my depth, any hel...
(0) odpowiedzi
2017-08-16 14:08 How can I declare type of an ES6 module in Typescript? »
I have a generic interface for a repository like this. export interface IBaseRepository<T> { create(model: T): T; edit(model: T): T; ...
(2) odpowiedzi
2017-08-16 13:08 Nodejs Parse Json file transform the input and write to file as JSON array »
I need to read a very big location history file and extract some data and write to a file as JSON data. How can i do that. The following code doesn't ...
(1) odpowiedzi
2017-08-16 11:08 Can't get ejs file »
I need to call an ejs file in another ejs file and exactly in function but i have always "can not get file" If i do an include file outside the functi...
(1) odpowiedzi
2017-08-16 05:08 Sequelize: Modify output of date timestamp using Getters »
I need to convert my signup_at timestamp to a certain format each time it's selected from the database. I want to use a getter for this, but it doesn...
(1) odpowiedzi
2017-08-15 21:08 .NET Core Docker Image for SPA Applications »
What is the correct Docker image to use when creating a new ASP.NET Core MVC app, specifically with the React/Redux (or other Node.js required) templa...
(2) odpowiedzi
2017-08-15 21:08 Ensuring that two separate objects have a unique total set of keys »
I have a JS framework (yes I know lol) and the user can inject values sourced from two different files. The injectable values are identified by the ke...
(3) odpowiedzi
2017-08-15 21:08 How to configure a proxy in Angular CLI »
I created a new @angular/cli project and added one http GET call in the root component. Without using a proxy this works fine. export class AppCompon...
(1) odpowiedzi
2017-08-14 20:08 Find and merge all package.json files into one using jq in bash? »
How can I find all package.json files and merge them into one file using jq within Bash? The following snippet is as far as I have gotten, however it...
(3) odpowiedzi
2017-08-14 19:08 Passing data from one page to another using Node, Express & EJS »
I've got the following routes set up: router.get('/', function(req, res) { res.render('index', {}); }); router.post('/application', function(req...
(1) odpowiedzi
2017-08-14 18:08 How to provide chai expect with custom error message for mocha unit test? »
I have a mocha test using chai's expect: it("should parse sails out of cache file", async () => { const sailExtractor = new Extractor(); c...
(2) odpowiedzi
2017-08-14 07:08 Grunt: How to correctly setup .html file for mocha testing? »
I am new to grunt and tests and currently I have setup like this: Grunt running tasks after which I have build folder where I have my compiled index.h...
(1) odpowiedzi
2017-08-14 03:08 Passing array of objects from EJS template to Javascript function? »
I have a basic Node.js application and when a user hits a certain route, a number of records are retrieved from the database in the route and passed t...
(1) odpowiedzi
2017-08-13 22:08 Am I better off splitting an elaborate mongoose model? »
Assuming the case of a /login API, where, for a matching set of credentials, a user object from the collection should be returned, which approach woul...
(1) odpowiedzi
2017-08-13 13:08 How to emit event from child process to parent process using node »
I am using const { spawn } = require('child_process'); and const process = spawn('node', ['test.js', someparams]); for spawn process using node. Ther...
(3) odpowiedzi
2017-08-13 00:08 What version of an npm library is *actually* used? »
I know that npm libraries, when installed, can install multiple versions of the same library in a hierarchical tree, like this: a@0.1.0 -> b@1.0...
(1) odpowiedzi
2017-08-12 16:08 Are there Node.js coding conventions/standards? »
Are there any OFFICIAL coding conventions/standards regarding Node.JS? I found this one but looks like opinion based: https://github.com/felixge/node...
(0) odpowiedzi
2017-08-12 12:08 latest node(v8.3.0) seems slower »
I have figured out that the latest released node(v8.3.0) runs much slower than an older version(v6.10.1) by running this simple test code (test.js): ...
(1) odpowiedzi
2017-08-12 10:08 Dockering a nodejs application with external dependencies »
We are building Node.js microservices. For some reusable components we have created a utils folder. This folder is outside the actual microservices pa...
(2) odpowiedzi
2017-08-12 05:08 req.csrfToken() is not a function »
This is the app.js file This is index.js file Whenever i run the node server it shows me an error - "res.csrfToken()" is not a function. ...
(1) odpowiedzi
2017-08-12 02:08 Render HTML string in isomorphic React app »
There is non-SPA scenario with sanitized yet random HTML string as an input: <p>...</p> <p>...</p> <gallery image-ids=""/&...
(2) odpowiedzi
2017-08-11 22:08 Why is "this" undefined in this class method? »
I've tried to search over what seems to be the entire internet, but I'm still vexed by a problem with a JS class I'm writing for a Micro Service (stil...
(2) odpowiedzi
2017-08-11 20:08 Module not found: Error: Cannot resolve module 'routes' »
I'm following Cory House's pluralsight course on building React in ES6. Unfortunately I'm stuck on one of the first couple steps, setting up the basic...
(3) odpowiedzi
2017-08-11 06:08 Cannot upgrade firebase-tools because dependency iltorb npm package fails to install »
I'm running Ubuntu 17.04 node version: 8.0.0 npm version: 5.3.0 node-gyp version: 3.6.2 csaba@titan:~/GitRepos/valleydevfest2017$ sudo npm install...
(1) odpowiedzi
2017-08-11 00:08 webpack template engine options with Node.js »
I have a question about which templating engine using webpack suits my requirements which are stated below. I have main page with a background image...
(0) odpowiedzi
2017-08-10 21:08 Hexo.js - How to display all posts that have tag on a page? »
I have a blog made with Hexo.js. I have a directory as follows: / - static text /blog - displays all blog posts /all-tags - displays all the tags and...
(0) odpowiedzi
2017-08-10 14:08 Forms in html tables »
i have a html table with two cells as input along with a submit button at the end of each row . I am struggling to pass the project ID(one cellin a ro...
(0) odpowiedzi
2017-08-09 05:08 Avoid image blinking when back button is hit »
I'm developing a web interface with an Instagram-like navigation. This means that I have a grid of pictures and when I click on one of these I go to a...
(2) odpowiedzi
2017-08-09 02:08 Mongo db with Monk: error catching and handling if db is down »
I'm new to Mongo. I needed a database for a simple project and ended up following a tutorial using Mongo with Monk but I have problems understanding ...
(1) odpowiedzi
2017-08-09 01:08 How to compare images and determine which has more content? »
Goal: I want to grab the best frame from an animated GIF and use it as a static preview image. I believe the best frame is one that shows the most con...
(2) odpowiedzi
2017-08-09 00:08 Headless chrome launcher --window-size causing error »
I need to be able to take screenshot given a certain window size. I read this blog http://phptest.club/t/how-to-run-headless-chrome-in-codeception/154...
(1) odpowiedzi
2017-08-08 17:08 Firebase Functions (trigger) “dynamically” write/update Firebase node »
I am wanting to retrieve data from a Firebase Node Games/{gid}/BoxScores which has four child nodes: Q1, Q2, Q3, Q4 Below is the code I'm trying to i...
(1) odpowiedzi
2017-08-08 12:08 Node.js event loop understanding (with a diagram) »
I've read this and this, watched this... I've made a diagram of how I understand it: Javascript callbacks (functions) can be present in the curre...
(0) odpowiedzi
2017-08-08 06:08 How to run complex command in node js spawn? »
I am developing a lib for docker command line in nodejs, I am still in starting face, I just tried basic docker run command using spawn in node js - ...
(1) odpowiedzi