Questions tagged as 'express'

1
answer

Give each player a different color when they log in

I'm doing a project which consists of a multiplayer minigame with Node , Express and Socket.io in which each player has a different color assigned by the server when entering and players will see a table which players have to paint the cell...
asked by 16.04.2018 / 16:13
0
answers

Mongoose Populate 2 arrays

I have a collection of products and another on the replacement of stock of the product. What I'm looking for is that when you get the products, all the product's stock dates appear, something like this: { "ok": true, "producto": { "rep...
asked by 06.04.2018 / 00:34
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

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
0
answers

How to order a web page to show it

My application uses token-based authentication. On the login page, I send the user's data and password. I must receive a token to set it to localStorage . once it is received and established. render the welcome page. This is my Front end c...
asked by 25.01.2018 / 15:56
1
answer

Send float using json

I am trying to send a number with a comma through JSON to save them in a MySQL database through a api rest created in node js. Endpoint code router.post('/', (req, res) => { const sensorData = { id: null, temperatura:...
asked by 04.02.2018 / 21:13
0
answers

Express, failure in res.render?

I have a problem rendering a dashboard.ejs . When entering my /login I have a javascript code that evaluates if I have a token registered in my local-storage , if it exists a /get to the dashboard and here the pr...
asked by 17.08.2017 / 20:52
0
answers

How to connect middlewares in Express - NodeJs?

I have problems to apply postcss-middleware after the sass-middleware in an API in express, the Sass middleware is applied but not the postcsss middleware. import autoprefixer from 'autoprefixer'; import express from 'express'; import pug from...
asked by 08.09.2017 / 23:37
0
answers

How to send data through a post request in NodeJS to the database in MongoDB?

I'm doing an App, which has a registry for users. I try to make that when the user enters the data they are sent to the database through that POST request. The database appears connected to me, but I can not find the code to send the data. Th...
asked by 23.06.2017 / 17:34