Questions tagged as 'ejs'

1
answer

Nodejs - How to use external variables in asynchronous functions

I'm starting in node and I still find the concept of asynchronous functions complicated. I'm using js to render templates to email in my application. The prototype is: "use strict"; const nodemailer = require('nodemai...
asked by 04.12.2016 / 23:55
0
answers

How to check if the EJS is responding

My application is node with express and ejs 1 - It is running index.html and not index.ejs 2 I am not able to pass the title or title parameter to the view, neither in ejs nor in html app.js and index.ejs look like this: var express = re...
asked by 05.07.2017 / 09:20
1
answer

Get information from a url using node + express + ejs

I have created a url in the following format: localhost:8080/forgetPassword/id/hash I have this route rendering: app.get('/forgetPassword', function(req, res) { res.render('pages/forgetPassword'); }); So I would like to target...
asked by 11.08.2016 / 18:29
1
answer

Form with Node / EJS does not work!

Good morning, I'm doing a form, using Node and the EJS view engine, however I'm having trouble getting data from the forms in the controller. The return of the req.body is always undefined. app.js with body-parser app.use(bodyParser.json())...
asked by 05.01.2018 / 14:23
1
answer

Retrieve HTML text from the MySQL database with EJS (Node.js)

I'm developing a news portal on Node.js where I save posts to a MySQL database. As a template engine, I use EJS. I use the Tinymce plugin to format the text of the posts (use bold, italic and etc). Tinymce is a visual editor for robust Intern...
asked by 28.05.2017 / 16:29
0
answers

Variable in EJS

Good morning everyone! So, come on: I'm trying to use Plotly to generate a bar chart, and it accepts variables. I have a connection in NODE.JS with a database, and NODE.JS in thesis (After a console.log in the route) is passing to the view wh...
asked by 11.09.2018 / 14:24
0
answers

How to receive an array in the body of a nodejs route

Good morning everyone. I am facing a great difficulty. I started a week of studies on nodeJS, so I'm pretty noob. I have a code that returns an object in json format for me and I would like to create a page that Body would receive this. howev...
asked by 27.07.2017 / 14:32
2
answers

Formatting JSON in EJS

I have a problem with using nodejs and express, I have never used this language and I do not have much knowledge of it so I will try to be as specific as possible here. 1 I have a webservice rest that returns me purchase orders with several i...
asked by 06.01.2017 / 14:47
1
answer

React-router not rendering pages not found correctly

I'm developing an application using React + React-router + Express to render on the server and inject into an EJS view. It is working correctly, but I noticed that by not finding a route like /naoexiste the request falls correctly on t...
asked by 02.12.2016 / 18:05
1
answer

Passing values between Express and EJS

I have a foo value that is obtained in an asynchronous method in a db.js file. The query is being performed normally and I can already capture the data of the foo variable in my index.js file, but when trying to pe...
asked by 04.09.2017 / 23:01