Questions tagged as 'ejs'

1
answer

Put EJS files in the Service Worker cache

I would like to know how I can cache the% .EJS files because they are not rendered by the browser, but by the server and only after sending the corresponding .HTML to the browser. self.addEventListener('install', function(event) { event.w...
asked by 16.01.2018 / 15:10
0
answers

Problems connecting Node and MongoDb

Some days ago I'm having a problem with a code that I can not resolve. What I am trying to do at the moment is to register the users in mongodb through the node. I am using the view mechanism ejs, but until then I have checked everything and it...
asked by 23.09.2018 / 03:15
0
answers

Node.JS does not save the data of a form

Good afternoon everyone! I'm trying to save the data from a form, and I have no idea why it's not saving. I remember that I would have to use a stringify, or something like that, but I can not see it. Below are the view (ejs) and the index.js in...
asked by 08.03.2018 / 20:06
1
answer

EJS include dynamic

Using Express 4 and EJS template engine, I came across the following: Let's say I have the following structure: meu_projeto/ +-- server.js +-- views/ ¦ +-- layout.js ¦ +-- admin/ ¦ ¦ +-- index.js ¦ ¦ +-- blog/ ¦ ¦ ¦ +-- in...
asked by 10.01.2018 / 16:08
1
answer

How to use DataTable Plugin (Jquery) with Node.js

I'm working with node and express and need to populate a table with information that comes from a SQL database. I run my code on page get like this: app.get('/Home.ejs', (req, resp) => { SQL_Server(Seleciona, (rec) => { resp....
asked by 24.11.2017 / 16:40
1
answer

Use javascript inside EJS file to display information from an array

I'm trying to display within an EJS / html file the values of an array that are sent from the server, but I'm not getting it. I know that to show the value of a variable inside an EJS file all I need to do is put the variable name inside the...
asked by 11.10.2017 / 06:28
1
answer

What is the best / most efficient way to send data from a view to a route using NodeJS and Express?

I am a beginner in NodeJS and am responsible for a project in this tool. I'm using the "EJS" engine to create the views. I created a form to send the information entered by the user to a route, on this route I want to process the information and...
asked by 09.10.2017 / 03:40
1
answer

I can not edit in CRUD - NodeJS + Express + MongoDB

Following: I started literally today working with NodeJS + Express + MongoDB and as an exercise I started with the famous CRUD (Create, Read, Update, Delete). I was able to do almost anything but edit, I'm really "beating myself" to solve,...
asked by 21.06.2017 / 03:13
2
answers

I can not relate MongoDB to Node

I'm trying to make a page that will have a form written Name and Comment, in which when the person fill in the name and the comment will appear underneath the formular.Só que ta giving error. Below this my file EJS and Just below the server file...
asked by 27.05.2017 / 02:12
1
answer

Problem loading static files on routes with nodeJS / expressJS

Programming my first system I came across a little problem ... I'm creating a client system and changed the structure of the views folder as follows: / app / views / clients clients.ejs add.ejs / users users.ejs add.ejs...
asked by 03.03.2017 / 18:21