Questions tagged as 'node.js'

1
answer

Requesting for failing API

I'm having a problem trying to make a request for a test API ... the connection is only successful if Access-Control-Allow-Origin is set to all * . The error in the browser: Content Security Policy: As configurações da página...
asked by 22.06.2018 / 18:55
1
answer

Restful API with NodeJS and Mysql with Multiple Columns (I want to return json in levels)

Alright. Can anyone help me with a question of Angular, or API with Node.js? I have a mysql api with Node.js with inner join in 2 tables, but of course mysql returns everything in a single array, but I think it is more correct and feasible to...
asked by 11.06.2018 / 19:52
0
answers

Doubt Socket.io Push Notification

Hello, I have an application made with node.js and socket.io which sends a push notification when the client.html page is open. my question is: How to send and receive notification even though the client.html page is closed. When the client.h...
asked by 01.06.2018 / 13:24
0
answers

How to replace html tags and save to a new file

I'm trying to check a .html file, remove some tags and create a new file with the changes made. In the method I am currently using (js, gulp) I end up doing multiple replaces in jail, I believe this is not the best way, I would like to know...
asked by 02.05.2018 / 14:56
1
answer

Enter data in server response node.js

Next, I seamlessly rode the example of hello world in node.js made available in express.js, access it normal in my localhost: 7000. Is it possible to manipulate hello World's response, such as font size, centering etc ... and display an image...
asked by 28.04.2018 / 23:44
0
answers

Upload Preview in modal

I was previewing through another tab: public visualizarArquivo(file): void { var url = window.URL.createObjectURL(file); var a = document.createElement("a"); a.setAttribute("href", url); a.setAttribute("target", "_blank");...
asked by 14.05.2018 / 13:15
0
answers

How do I change the input type="file" path and submit form with another image?

I need to upload multiple images that are inside my application. My form is this: <form id="uploadForm" enctype="multipart/form-data"> <div class="file-field input-field offset-s4"> <div cl...
asked by 23.05.2018 / 09:39
0
answers

Node Js - node-soap

I have a soap client with the following code in nodejs: var soap = require('soap'); var url = 'bin/NfeStatusServico2.wsdl'; soap.createClient(url, function(err, client) { client.setSecurity(new soap.ClientSSLSecurityPFX( 'xxxxxxxxxx...
asked by 13.04.2018 / 20:07
0
answers

Error in ajax request on the Node

I have a view that contains a form for login. The request is sent via ajax, but the data is not being fetched and the req.body in the backend is empty. Even though I'm creating a string and passing to the node, the req.body is still empty. Fo...
asked by 10.04.2018 / 22:55
0
answers

OPTIONS is generated when a POST is performed

I have an API and am trying to connect to an online store but every time I try to perform a POST an OPTIONS is returned. I decided to use JWT to authenticate requests and avoid OPTIONS but to no avail. app.post('/auth', function(req,res){ v...
asked by 27.04.2018 / 17:28