Questions tagged node.js

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

How to guard against Angular 9 AOT

I wrote a simple relativize function but since Angular 9 uses an AOT compiler, the following code no longer compiles: var absolute = function(loc) { if (typeof window !== ‘undefined’ && typeof document.createElement === ‘function’) { var a = document.createElement("a"); a.href = loc; return a.href; } else if (typeof exports === ‘object’) { //node.js require(‘path’).resolve(loc); […]

By tresf
Published
Categorized as angular, angular2-aot, javascript, node.js Tagged , , ,

Globally Apply Decorator to All Controllers Nestjs

I am creating an API using Nestjs and in trying to scale realized that there are some decorators that I use that are needed for every controller. E.g @ApiBearerAuth(). Is there a way to globally apply decorators on all controllers or all controller methods of a project. Source: AngularJS Questions

By NightMNKY
Published
Categorized as angularjs, express, nestjs, node.js, swagger Tagged , , , ,

Sign in with Apple implementation with Angular

I am trying to implement Sign in with Apple in Angular website. The flow of implementation starts with adding in the index.html file. Then created a service called apple-login-service.ts using scriptjs. This is the code for apple button in sign-in-container.html file. <!– Apple button –> <div class="row"> <div class="col-md-12 d-flex justify-content-center align-self-center"> <div id="appleid-signin" class="signin-button" […]

By Amolbir Singh Dhillon
Published
Categorized as angular, apple-sign-in, ios, node.js Tagged , , ,

How to send image file as response to Angular from Node

I was trying to upload an image using multer and successfully i uploaded the image in the backend folder named images, where all the images are stored when uploaded from angular frontend. But i also want to send back the image as response when an api is called along with some json() data. Here is […]

By Arun Mishra
Published
Categorized as angular, express, node.js Tagged , ,

angular makes post request of a reactive form automatically

i am trying to develop a crud using mean stack, when making http requests angular works fine but i only want angular to make post request when the submit button for the reactive form is pressed, but it makes both get and post request to the nodejs/express server automatically. is there any option to make […]

angular does not make post request to node js rest API

I am trying to develop a simple crud app using MEAN stack, but when trying to post form value angular service is not making post request. get request works perfectly but post not. i am using morgan to see the requests made to the nodejs server and it is not receiving the post request and […]

By Daniel Chavarria Chavarrio
Published
Categorized as angular, mean, node.js Tagged , ,

getting 404 error from nginx for a route which is redirecting to a .html file

I have following route in nodejs app.get(‘/admin’, function (req, res) { console.log("CAME HERE"); res.redirect(‘/login.html’); }); my nginx.conf looks like this upstream dev{ server 127.0.0.1:3001; } server { listen 80; server_name dev.abc.com; location /api { proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; proxy_pass http://dev; } location /admin { proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; […]

By Divya Singh
Published
Categorized as angular, devops, javascript, nginx, node.js Tagged , , , ,

Getting a 500 error when making HTTP post request in Angular/ Node.js

I was stuck when trying to make a post request with Angular httpclient, here is the code I used to export data in Angular service: /* UPLOAD_URL = "https:/semi.edu/uploadData" */ this.http.post(UPLOAD_URL, this.tracker.traverse_order).subscribe( (response) => console.log(response), (error) => console.log(error) ); And this is the code I included in app.js (node.js file): var db = require(‘./db’); var […]

https not working – http requests get status:0 response

currently I’m running my angular app from my backend, node and express, by using the ‘dist’ folder after production (command : ng build — prod) using this code to run the angular dist folder inside node backend/app.js : app.use(express.static(path.join(__dirname, ‘dist/Project’))); backend/index.js: router.get(‘/’, (req,res) => { res.sendFile(__dirname,"../dist/Project/index.html") }); the certificate code : backend/bin/www.js var port = […]

By Jon
Published
Categorized as angular, express, node.js, ssl Tagged , , ,

Azure Active Directory Token verification fails – Cannot fetch data from JWK_URI

I have an Angular app running with Node.js back-end. It was deployed to the server and I am trying to verify Azure Active Directory token on the back-end by using azure-jwt-verify npm package. The problem is that the token is verified successfully on the local but it throws an error on the server. The error […]

1 156 157 158 159 160 180

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
faq