Questions tagged express

Explore the latest questions and answers asked by our top developers.

API call with JWT token and an ID in URL

I am working on an angular application, where a request is being sent to the express backend. With the request, I am attaching a JWT token in the header using an auth-interceptor. The API request URL is as follows: http://localhost:3000/api/:userID/askQuestion I am sending the userId in the URL and the JWT token in the header […]

Using generated express app as backend in Angular 12

thank you for visiting my question. i was learning web developer by myself since 2020 (i have no mentor and all of my teacher is you, guys!). my path is to be a MEAN stack. i have learn about fundamental HTML, CSS, JS Native, Bootstrap, SCSS and currently i was learning about JS Framework (Angular) […]

Express send binary buffer to Angular 9

Good day everybody. In my compare2.js (Node JS/Express service) this is my code: var express = require(‘express’); const fs = require("fs"); var cors = require(‘cors’); var app = express(); app.use(cors()); const port = 3001; var imgBuffer; let img = __dirname + "/zeb1.jpg"; fs.readFile(img,function(err,content) { if(err) { console.log("NO image!") } else { console.log(content); imgBuffer = content; […]

By Alessandro Cinque
Categorized as angular, express, node.js Tagged , ,

Angular hide div on click function

i am new to angular and typescript and i need to hide div section *ngIf="stu.notes != null" on save button click. i can display the respective divs when clicked on the respective buttons, but i am not able to hide the other one. Can anyone hep me out here. Thanks in advance. <nb-accordion-item-body> <div class="row"> […]

By anuj todankar
Categorized as angular, express, mongodb, node.js Tagged , , ,

Formatting error should fail bundling in NodeJS + ExpressJS + TSLint + Prettier

I would like to implement a feature like, if any of the file code is not formatted or not followed the standard then build has to show the errors with the line numbers, eg. Semistandard in JS. Likewise for TS. Because, team members are not formatting the code, and other developers are feeling hard to […]

How to use interceptor with proxy.conf.json angular

I need to use interceptor for requests. And also I need to use proxy.conf.json file to avoid error with CORS. How can I use interceptor and proxy.conf.json together? { "/api/*": { "target": "http://localhost:9000", "secure": false, "logLevel": "debug" } } Interceptor @Injectable() export class EndpointInterceptor implements HttpInterceptor { private static addRequestId(request: HttpRequest<any>): HttpRequest<any> { return request.clone({ […]

By Egor Grinevich
Categorized as angular, cors, express Tagged , ,

Bitnami MEAN restful connection timed out

Hi i’m building a MEAN application using AWS’s MEAN stack container with bitnami preinstalled. I have apache with angular running on port 80 and Node.js express running on port 4000. All the rest api calls fail returning connection timed out note this was working perfectly on localhost Source: Angular Questions

By Federico Tarascio
Categorized as angular, bitnami, express, mean, node.js Tagged , , , ,

Angular | NgFor to display the array contents

I am new to Angular and trying to get the values inside postdata, but when i am trying to iterate over it , its only giving me the first value. Attaching my code: posts; constructor(private getpostservice:GetpostsService) { } ngOnInit(): void { this.getpostservice.getposts().then(data=>{ this.posts = [data]; console.log("Inside home",this.posts); }) } This is my html logic: <tr […]

By Subhodeep bhowmick
Categorized as angular, express Tagged ,

Can’t fetch Notes(Data) from Api using user_id

I want to fetch notes data from the api using user_id, but I am not able to hit the api i tried logging but can’t fetch data from api . Can anyone hep me what i am missing in code Console Check Error I am getting 404 error while fetching data. Status : Not Found […]

By anuj todankar
Categorized as angular, express, mongodb, mongoose, node.js Tagged , , , ,

MEAN stack app on ubuntu 18 stopped working after update :(

Link in giltab : Stack : Mongo database cloud : —— ubuntu 18 — Install NVM sudo apt install curl curl master/ | bash source ~/.profile —install node js 12.16.1— npm 6.13.4 nvm install 12.16.1 —install angular 7.2.3 npm install -g @angular/[email protected] — install express 4.16.4 npm install -g [email protected] — copy source […]

1 44

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us