Questions tagged as 'express'

2
answers

Doubt with node.js - Error: route.js: 162

I'm having trouble running my application. I made the right mappings, according to the book in which I am learning (MEAN stack of the Code House). Express.js file // config/express.js var express = require('express'); var home = require('.....
asked by 07.07.2016 / 22:40
1
answer

How to handle the routes of my app with Express

Guys, I'm using a framework for the front of my app. He stays listening and whenever he clicks on a link he returns the page via Ajax request. Note: I'm using AngularJS. With Angular I can handle routes, but it requests the file and injects t...
asked by 23.07.2016 / 15:10
0
answers

Write image file with nodeJS

I get an image in the image: date format and need to save it as an image on the server, I tried: var imageData = req.body.imagem.replace(/^data:image\/png;base64,/, ""); fs.writeFile(url, imageData, 'base64', function(err) { if(err) r...
asked by 28.06.2016 / 23:05
0
answers

Mean Stack Running the first project

Good afternoon guys, I'm trying to run the mean stack on my machine (Ubuntu 14.04, 64bit), I followed the site step by step and everything seemed to go well when I started up the cam in ternimal everything works fine, I'm going to access the url...
asked by 07.05.2016 / 17:20
0
answers

How to redirect to a page with node js?

I can do this more with a route, but I want to do something like: app.redirect(url); and not: app.get('/', function(req, res) { res.redirect(url); }); Can anyone help me? vlw, and obgd!     
asked by 18.03.2016 / 18:21
1
answer

Using the filter in ng-repeat in jade templates

Personally I think I'm doing something wrong but I can not find the error in the code. ul(class='list-group') li(class="list-group-item", ng-repeat="v in votadas | filter: '-votos'") h4 Música: {{ v.titulo }} | Votos: {{ v.vo...
asked by 12.12.2015 / 22:28
0
answers

Bad Request when signing in with Passport, Express and NodeJS

I am trying to authenticate a system but whenever I try to login (post) I get an error:    400 (bad request). The console displays the message:    The character encoding of the plain text document was not declared. The document will r...
asked by 21.08.2015 / 16:19
1
answer

Node.js - Get URL parameter via Jade

I have the following url http://localhost:3000/user/index/1 , I would like to be able to get the last parameter. I tried with - var name = window.location.pathname; putting in the .jade file and it did not work, but if it is possibl...
asked by 13.08.2015 / 04:24
0
answers

How to host server on local router with Express.js on Mac OS X?

Since I started using Mac I am no longer able to host a local server on my router with Express. In ubuntu it was enough to pass the IP of the router as the second argument of app.listen and everything worked: like . When I try to...
asked by 04.04.2015 / 23:24
2
answers

How do I configure an SSL certificate for an application that runs in Express?

How to set up an SSL certificate for an application that runs in Express? I'm trying to configure the Express server I created, to pass the SSL certificate and go from http to https. I have read the Express documentation, but I can not fin...
asked by 25.07.2018 / 17:34