I tried every possible solutions that I found, but none of them working. The body-parser is installed, the front-end is also correct. When I send a form, the url is /addChess?name=123&hp=123&damage=123&skill=1&class=1 However, the req.body
I'm trying to build an android application using node.js web services,the first interface allow the user to connect to a host using ip address,login and password, so he can get all the databases,i want to save the object credentials to use in all oth
APP.GET('/', isLoggedIn, function(req, res) { if (isLoggedIn){res.render(index-authed) else { res.render(index)} }); how do i check what isLoggedIn returns? so i can handle flow like this?You can pass loggedIn status in your req object in loggedIn fu
I'm using ajax to do so and am responding with res.end on the backend but so far, I can only POST once. Here is my code: Server app.post("/awesome", passwordless.restricted({ failureRedirect: "/" }), (req, res, next) => { // ...do a
I am working with a Node (Express) based API, which, upon request, passes some HTML and jQuery to the frontend, which is embedded into the document. I'm looking for a neat way to stringify the function on the backend so that I can send it to the fron
This question already has an answer here: How do I return the response from an asynchronous call? 31 answers Lately I have started experimenting with Node.js and Express.js. I am building a micro-application which takes in the data from Mongo Db and
Nodejs server which is installed on my VPS is accessible only on my network. People from outside world cannot access it. If its online, it should either be accessible all over the world or nowhere. What to do? Code in my js file: var app = require('e
I am not able to import images in my headercomponent.ts. I suspect it is because of something i am doing wrong while compiling ts(using webpack ts loader) because same thing works with react( where the components are written in es6) The error locatio
I'm embedding a Google Map within a website with a KML Layer and I'm struggling with what I would think is a very basic issue. I have a KML file on my computer that I want to add to my map as a KML layer but I don't know how to "access" that spe
I have successfully set up a database using mongodb, and I have managed to add new entries to my collection. However, when I use a similar method to delete, nothing happens. Express.js code router.post('/deleteproject', function(req, res) { var Mongo
I want to insert multiple data by for loop , but this code add 2 or 3 data only , then its continue loading loading but nothing happen ... router.post('/addclient' , function (req , res){ var finished = false; var user = req.body.username; for(var i
I am using express and passport to build a rest api backend and it seems that my localStrategy is not getting called on request. The entry point of my application looks like the following: app.js var fs = require('fs'); var express = require('express
I use ExpressJS for routing, and bluebird for Promises. I have the following code repeating for few routes, and in the end they all have the same .catch function, with responds with a json of failure. router.get('/', function(req, res) { return someP
I create an express project and the directory structure like: / - model db.js - routes users.js app.js In ./model/db.js, I have a MySql connection: var mysql = require('mysql'); var connection = mysql.createConnection({ host : 'localhost', user : 'ro
I'm working to update a simple NodeJS + ExpressJS app to use TypeScript. I've got it working, but I'm having fits adding some extra data annotations to add extra type checking and code-time autocomplete/IntelliSense in Visual Studio & WebStorm. I've
I need to do a repetitive auth process in most routes in my app. I decided to give some structure to it and get that repetitive work in a middleware function. If the auth process isn't valid, I should response and avoid second function to execute, te
I use an express app to serve an static pre-compiled jade file. which includes a external javascript file. but its not loaded while the page gets loaded. but i can access the javascript by the express static/public url. Why its not loading on the htm
I am using Expressjs version 4.I am getting 'undefined' on req.param. Here is my example : app.js var express = require('express'); var bodyParser = require('body-parser'); var newdata = require('./routes/new'); ........................ .............
EDIT: I modified my app.js part so that I can pass in files and just do something like what I did with the title, but it doesn't work for some reason. I currently have my header.ejs page loading the index stylesheet on every page. <head> <title&g
I'm migrating old sites to Express/Jade having the "HTML 4.01 Strict" doctype. I want to keep this doctype for now. How do I get this doctype in Express/Jade? "doctype strict" only provides the XML type, not HTML. Of course I can type
I am new to nodejs and am trying to set up a server where i get the exif information from an image. My images are on S3 so I want to be able to just pass in the s3 url as a parameter and grab the image from it. I am u using the ExifImage project belo
i'm trying to make Samsung Smart TV app with node.js . In my project, i want to make my app communicating with server pc. According to Many Web sites, i can do this with "jsonp". Here is a client side code that i found. <html> <head>
I've just started to play around with node, express and thus, jade. I try to do something like this in a jade template: my-options = {"this": "something", "that": "something else", "those": "more stuf
So I've got an express site running on Windows Azure. I'm currently having problems submitting forms that are marked as enctype="multipart/form-data". The error I'm getting in the logs is: TypeError: Object # has no method 'tmpDir' When running
I am running a nodejs + express based api server from heroku and using the dropbox-js library. Here's what I'd like to do: A user hits a specific api endpoint and kicks off the process. Generate some text files via a node process and save them on the
I have a nodejs app that uses Express and Jade(now Pug). I want to precompile the jade templates for better performance. I have been able to convert the jade to javascript using jade --client to compile all the .jade files to corresponding .js. How d
I have the following simple shema: var userSchema = new Schema({ name : String, age: Number, _creator: Schema.ObjectId }); var User = mongoose.model('User',userSchema); What I want to do is create the new document and return to client, but I want to
I have my file reading in and being parsed properly but I can't seem to return the string of output. I would like to be able to access this string from a variable that it gets assigned to on the client. I'm using async series to help alleviate callba
i started using railway (a node.js mvc framework) and i want to use sass/less/stylus as a css render engin. i couldn't find how to configure that in railway. railway uses express.js so i guess i can install it via that. i already installed stylus (an
I have a simple Express based Node.js web server that I'm using for development of a JavaScript application. I set up the server to use node-http-proxy to proxy API requests the application makes to a Jetty server that is running on a different domai