Questions tagged express

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

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 […]

API Requests from Angular Web App to Express API not working

Context: I’m working on a CRM system, on the first load I make an HTTP GET request to an express API. This works the first time as expected. Call history: ngOnInit() > fetch(…) This works as intended. Problem: When I make a second request later, it does not working. The Function gets called as expected, […]

By OliverKarger
Categorized as angular, express, javascript, typescript Tagged , , ,

How to run Node app locally from Github repo?

I want to run this locally. I did the following steps Cloned the app locally Then did npm install to download all the dependencies Opened the app folder and executed node server.js But getting Cannot Get / when opened the webpage. Any help would be helpful. Source: AngularJS Questions

By Hamza Hanif
Categorized as angularjs, build, express, javascript, node.js Tagged , , , ,

How to prevent a 422 error from displaying in console when making a call to an express API from an Angular project?

Currently, I have an Angular service that makes GET calls to an API I made as follows (it also performs some error handling): //Solutions URL and rest of service is above getSolutions(defect: Defect, messageService: MessageService): Observable<Array<string>> { let opts = new HttpParams(); opts = opts.append(‘Name’, defect.Name); return this.http.get<Array<string>>(this.URL, { params: opts }).pipe( tap(solutions => { […]

By JCrew0
Categorized as angular, api, express, rest, typescript Tagged , , , ,

Angular Universal trying to open app.component.html

I’ve recently upgraded my Angular and I’ve had some problems with server-side rendering. I’ve had some issues which I’ve managed to fix but I’ve gotten stuck on the following error: Error: ENOENT: no such file or directory, open ‘app.component.html’ I wasn’t able to find somebody else facing the exact same issue, most of the problems […]

1 2 3 38

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