Questions tagged as 'express'

1
answer

Function nodejs, operation

app.get('/', function(req, res){ res.send('Ola Mundo'); }); In case of this simple code just to illustrate we have a function in nodejs with 2 parameters the requisition and the answer, I wanted to know if someone can explain me better h...
asked by 12.04.2018 / 09:42
1
answer

Link in terminal

Is there any way to do that when the localhost:3000 , which is in the terminal, is pressed ctrl + click the browser is opened in the page in question ( localhost : 3000 ) ... this in a Javascript code: console.log('\nServ...
asked by 20.01.2018 / 00:02
2
answers

How to give a disabled in a form depending on which radio button to choose?

Good afternoon ... I have the following radio buttons: <input type="radio" name="radio1" value="entrada"> Entrada <input type="radio" name="radio1" value="saida"> Saida I also have the following forms: <div class="form-...
asked by 14.11.2017 / 20:49
1
answer

Error: "Can not set headers after they are sent" in Node.js / Express

I have the following method: //USER_POST router.post('/user', (req,res,next) =>{ var obj = {name:req.body.des_name, email:req.body.des_email, endereco:req.body.des_endereco, c...
asked by 17.10.2017 / 15:59
1
answer

Express return post

Good afternoon, I have a problem with the POST return in express, I wanted to make a user registry using the following code: router.post('/user', (req,res,next) =>{ var obj = {name:req.body.des_name, email:req.body.des...
asked by 11.10.2017 / 20:02
1
answer

res.json NodeJS / Express

I have a cruel doubt on nodeJs / Express, I'm pretty new to the language but what I need is to pass the id on a route so that it executes and returns a query. I want to do in fragmented files, so I have a Routes file (with all routes) an API...
asked by 06.10.2017 / 22:27
1
answer

Return JavaScript script with Node.JS

Using Node.JS I want to read a JavaScript script in a folder and return it. It turns out that when I access the file through the browser, the code appears normally. However, the script is not embedded in the HTML page using the <script>...
asked by 03.09.2017 / 02:40
1
answer

Use delete method with express

Hello, I'm trying to send a value of a form (id) that will be handled by the expression (I do not know the technical terms for this, if you can help me too), I've tried a lot but I can not pass the id parameter on action and do not access the app...
asked by 16.08.2017 / 20:34
1
answer

app.set ('x-powered-by', false) does not work on expressjs

Hello, in my main code of my app, with the use of express, I'm trying to remove the "x-powered-by" header, and I've used both app.disable("x-powered-by") how much app.set("x-powered-by", false) In addition, I've already tried using the...
asked by 07.07.2017 / 22:29
1
answer

Object.anonymous (Express + Middleware)

> > node index.js C:\Users\cpsep\Projetos\nodejs\semparar\node_modules\express\lib\express.js:107 > throw new Error('Most middleware (like ' + name + ') is no longer bundled with Express and must be installed separately. Please >...
asked by 09.08.2017 / 17:17