Questions tagged as 'nodejs'

1
answer

Create backup files by time in Javascript

I have a JSON file in which I want to create a series of backups in a period of 5 minutes, at this moment, I have a program running with NodeJS that reads and writes a file defined by: let points = JSON.parse(fs.readFileSync('./points.json', '...
asked by 21.12.2016 / 12:35
1
answer

novice res.locals and can not set headers after they are sent

Hi, I'm in need of help with a pretty strange problem I have a layout that contains the head of my html plus the navbar or navigation bar, in this navigation bar I have a form that has a select tag and these options are created with a variable t...
asked by 12.12.2016 / 05:05
2
answers

as it redirects into nodejs and jade

File app.js var express = require('express'); var routes = require('./routes/index'); var bodyparser = require("body-parser"); var middleware = require('./routes/middleware') var programmers = require('./routes/programmers'); var programmersMo...
asked by 16.11.2016 / 14:44
1
answer

Can JSP and Node JS be joined for backend?

I'm using Node JS for backend . Is it possible to use JSP to receive data from one form, and Node JS for another?     
asked by 16.11.2016 / 03:55
1
answer

convert array to json

I have this array    var array = [4,5,7,80,4,52,15,5]; and I want to convert it to this format [ [[2.0924907914914139, 2.3946516145034309], 1], [[2.4682273904177849, 1.6516482666336787], 1], [[1.9754558657999959, 1.9355779157529831]...
asked by 15.11.2016 / 15:11
1
answer

Failed to lookup view "home" in view directory using handlebars

Hi, I'm using node with express and handlebars but when I try to render the view, the error mentioned appears.    Error: Failed to lookup view "home" in views directory   "/ home / joaquin / workspace / nodejs / EasyRcu / views" at   EventEmi...
asked by 18.10.2016 / 15:09
1
answer

Query about nodejs middleware

I have the following routes and the following middlewares router.use(logged.unlogged); router.use("/logout",logged.logged); router.route("/login").get(login.login_get).post(login.login_post); router.route("/recuperar").get(recuperar.recuperar_...
asked by 25.09.2016 / 19:16
2
answers

Consulta about protecting apis and sessions in nodejs

My query is the following, I want to manage user sessions, that is to say an account, have c / u their own things, besides I want to protect my apis, finding out a little, I have seen that I can use jwt in nodejs along with sails for manage the...
asked by 23.09.2016 / 13:58
1
answer

Consultation nodemailer nodejs

I'm trying to send a message on a network with an active proxy ip proxy: 192.168.2.1: 3128 I configure my options on nodemailer var smtpConfig = { host: 'smtp.gmail.com', port: 465, auth: { user: mailconfig.email,...
asked by 27.09.2016 / 00:25
1
answer

Validate models with mongoose nodejs

I have my user model. // models/user.js var mongoose=require("mongoose"); var Schema=mongoose.Schema; var userSchema=new Schema({ name:{ type:String, required:"Es necesario un nombre", maxlength:[10,"Nombre muy larg...
asked by 24.09.2016 / 17:46