Questions tagged as 'nodejs'

0
answers

POST http: // localhost: 3000 / product 500 (Internal Server Error) AngulaJS, Express, Node and Postgres

I need help to solve the following, I am making the connection to the BD, when I do a GET it works very well for me, but when I do a post, I get this error: POST http://localhost:3000/product 500 (Internal Server Error) I'm doing it this wa...
asked by 02.04.2018 / 04:39
0
answers

JSON Web Tokens vs. session cookies [closed]

Which of the two approaches to handling sessions is better? In some cases they claim that the use of JWT is better, because of both horizontal and vertical scalability and that it improves server performance in case the number of users is larg...
asked by 09.04.2018 / 19:31
0
answers

problem loading an HTML template with "fs" nodejs, inside an ES6 class

SOLVED: The problem was that webpack changes the default behavior of __dirname and you have to configure it so that the routes work for me. I added this: context: __dirname, node:{ __dirname: true //The "dirname" of the input...
asked by 10.04.2018 / 15:58
0
answers

You may need an appropriate loader to handle this file type

Trying to replicate an example of configuring an environment to work with React and Node , I get an error, implying as if it were not the loader respective to load and transpilar the files. [nodemon] restarting due to chang...
asked by 17.03.2018 / 17:11
0
answers

how to send two data to an html file via socket.io?

the code with nodejs, I'm working with socket.io function onDato(dato){ io.sockets.emit('lectura', dato); } Here I show the code made with angularjs, if it shows me in html the data but as I am sending two at the same time nothing else show...
asked by 16.03.2018 / 00:16
0
answers

How to create collisions between sprites of an array

I have created several sprites with phaser and I have stored them in an array. function createShip(x,y,angle,ship){ var s = game.add.sprite(x,y,ship); s.rotation = angle; s.anchor.setTo(0.5,0.5);...
asked by 19.03.2018 / 00:22
0
answers

Change angle path without reloading views or controller

I am creating a web platform with angularjs and nodejs, I have a problem with the function of changing the language. Routing: $routeProvider .when('/:lang?/index', { templateUrl: 'modules/Home/HomeView.html', controller: 'HomeCt...
asked by 27.02.2018 / 15:42
1
answer

React.createElement: type is invalid

I'm taking a tutorial to learn React JS , everything was fine, days ago I could run an example, simple, carrying out a recommended basic configuration, plus a few more add-ons that I add to recognize the version of Javascript . T...
asked by 12.02.2018 / 00:40
0
answers

How to upload videos in mp4 format with webpack?

My current webpack.config const webpack = require( 'webpack' ); const ExtractTextPlugin = require( 'extract-text-webpack-plugin' ); const PurifyCSSPlugin = require( 'purifycss-webpack' ); const autoprefixer = require( 'autop...
asked by 10.02.2018 / 12:13
0
answers

Use of fetch javascritp. And receive data with express

I have a question. You will see I am sending the data of my form with help of fetch like this: const formSignin = document.querySelector('#formSignin'); formSignin.addEventListener("submit", event => { event.preventDefault(); con...
asked by 23.01.2018 / 21:28