3,865 questions
0
votes
0
answers
42
views
Docker bridge network hosts tls encryption
The basic idea is to get to a zero tolerance architecture. For which reason I intended to upgrade the communication between my hosts on my docker network with tls. I was thinking it would be easy. As ...
1
vote
1
answer
710
views
Preventing mat-autocomplete panel from closing when selecting multiple options
I am trying to prevent the mat-autocomplete panel from closing when selecting multiple options. Here’s my implementation:
<mat-form-field *ngIf="filter.type === 'organisation'">
&...
0
votes
1
answer
105
views
Angular 17: localStorage is not defined Error After Saving Changes and Browser Stuck in Reloading State
When i run project in angular 17 it runs successfully. However when i made some changes in code and save changes then:
The browser page stucks in a reloading state
Also this error shown up:
Error ...
1
vote
0
answers
200
views
Angular 17 Interceptor Not Adding Bearer Token on Initial Login Request
I'm working on an Angular 17 application where I'm trying to add an Authorization Bearer token to the request headers upon login. However, I'm facing an issue where the HttpInterceptor retrieves null ...
2
votes
1
answer
1k
views
provideHttpClient "Type 'EnvironmentProviders' is not assignable to type 'Provider'. Error in Angular 18
I am working on an Angular 18 application and was getting errors from the deprecated HttpClientModule so I moved to provideHttpClient and keep getting the following error:
Type 'EnvironmentProviders' ...
0
votes
0
answers
86
views
How can I extract [object Object] that I received from my request.query
I am trying to send a object to my backend through a object, but when I try to extract that I am getting [object Object].
These are the filters:
public filters: { [key: string]: any } = {};
And I add ...
2
votes
1
answer
69
views
MEAN project - Multer messes up request body
I am new to MEAN stack and I'm trying to create login and register functionalities where register includes profile photo upload. That's how I stumbled across the multer library.
Overall, after ...
1
vote
1
answer
62
views
Issue with Multer Middleware: Only Single File Not Being Processed Correctly in Express Application"
When using Multer in an Express application, if maxCount for file uploads is set to 1:
Expected Behavior: When a single file is uploaded, req.files should be populated with the file, and the ...
0
votes
1
answer
45
views
Handling large amounts of data efficiently in a MEAN stack application while ensuring data consistency can be challenging
I am facing technical issues with handling a large amount of data in my MEAN stack application. To avoid repeatedly calling the API, I have implemented local storage to cache the data. If the same ...
0
votes
0
answers
58
views
Upload | Images are not retrieved on live server | MEAN stack
I am building a MEAN stack app where I am taking an input via a form where the user upload an Image and it is shown as a profile picture. When I run the test in local the upload / image is retrieved ...
0
votes
0
answers
44
views
CORS error continues on node.js even after importing the cors package
I have included the cors package tries the res.header and still getting the cors error
Access to XMLHttpRequest at 'localhost:3000/auth' from origin 'http://localhost:4200' has been blocked by CORS ...
0
votes
0
answers
66
views
Workflow for an Angular form that also includes a file upload - what to do in case of errors (MEAN stack)
I have an account creation form with an optional profile picture file upload. If the user submits (after validation), I need to store the profile picture (eventually S3 or another cloud service) and ...
-1
votes
1
answer
125
views
Page not displaying on Chrome MacOS
I have a website that is in production using the MEAN stack. One issue is that the chrome will display one of my new pages as a blank screen, even after I hard refresh. However, I can see the page in ...
1
vote
1
answer
239
views
in angular 16 project when we call REST Api from project it will shows error but when we direct call from POSTMAN or browser it will shows data [duplicate]
angular 16 project service data call
getData() { this.regionService.getAllRegion().subscribe(data => {
this.regionValue = data;
})}
Service Data call rest Api
getAllRegion(): Observable<...
0
votes
1
answer
48
views
Subscribe method not working in MEAN stack application
I have created a backend for my application and am now developing the frontend. I am trying to do the register component of my application.
This is my Register Component with me attempting to register ...
0
votes
0
answers
229
views
Design question: should calculation done in frontend be stored in backend?
I'm making a dish price calculator web app with MEAN.
On the component DishDetail I calculate the price of the dish based on added ingredients (I call them dish components).
The HTML:
<p class=&...
-1
votes
1
answer
182
views
How can I use hardware keys (Yubikey and Titan Key) with multiple applications?
I am developing a Saas application, that implements the 2 Factor Authentication feature, using hardware keys (Yubikey, Titan Key), using WebAuthn/U2F protocol.
The feature is working well for ...
0
votes
1
answer
285
views
I am having trouble connecting to the Stripe checkout API in my MEAN stack project
enter image description here
This is the error I am getting in the dev tools
enter image description here
This is the error in the backend terminal.
https://stripe.com/docs/checkout/quickstart
here is ...
0
votes
1
answer
93
views
MEAN Stack CORS error even after using CORS middleware
I am working on an Angular app with NodeJs backend and I am getting CORS error even after using CORS middleware. Have a look at my code:
var mysql = require('mysql');
const fs = require('fs');
const ...
0
votes
1
answer
44
views
how to add findone for name validation in nodejs details from mongodb [closed]
anyone of you can slove this problem the duplication of name to avoid and execute on postman api the codes are attached below
*employeemodel.jsenter image description here
*employeecontroller.jsenter ...
0
votes
1
answer
634
views
MEAN STACK ,"Error in Postman : Username or password is invalid! "
I am beginner in mean stack development and i am trying to run "api/users/login" in Postman it is showing "Username or password is invalid!". And when i am run "register/users/...
1
vote
1
answer
712
views
Why does my MongoDB Atlas cluster go into sleep mode after 30 minutes of Mean stack app inactivity on Render.com?
My mean stack connected to mongodb atlas doesn't load after 30 mins of inactivity.
I created a mean stack app connected to atlas cluster and deployed it on render.com.
But 30 mins after I stop working ...
2
votes
6
answers
71
views
How to Filter MongoDB Data Based on Array Values?
I have a document in a collection which have values in array.
{
"name": "ABC",
"details": [
{"color": "red", "price": 20000},
...
0
votes
1
answer
832
views
Unable to launch an Angular application from cmd using the ng serve command
I am trying to import and launch a project: MEAN Stack Task Manager Application from this git repository: https://github.com/Devstackr/task-manager-mean-stack
These are the steps I have taken so far:
...
0
votes
1
answer
100
views
why i can't test ionic app with android studio
i created an ionic capacitor app for the front end using angular and the backend with express node and mongodb, with cookies to storing the jwt , with testing the app with ionic serve in localhost it'...
-1
votes
1
answer
247
views
What are some best practices for properly unsubscribing from observables in Angular to avoid memory leaks and improve application performance?
What are some best practices for properly unsubscribing from observables in Angular to avoid memory leaks and improve application performance?
In Angular, observables can be used to subscribe to data ...
0
votes
1
answer
47
views
Ajax isn't fetching the text file
<!DOCTYPE html>
<head>
<title>
Ajax Joke of the Dya application
</title>
<script>
var Request = false;
if (window.XMLHttpRequest) {
...
2
votes
0
answers
72
views
How to solve browser cache and service worker issue
I have two websites with the same domain, the first one (which is the old one also) is developed using MEAN Stack, we were using it for years. We had enabled service worker of Angular.
Now after years ...
0
votes
1
answer
2k
views
MongoDB Atlas Search not showing results when typing few characters
The problem I am facing is that I want to develop an autocomplete search bar using Mean Stack like the one in this site, but when I type, for example, 'ag' it's not returning the right location that ...
0
votes
0
answers
36
views
MongoDB connection is not connecting to client in localhost
Setting up a MEAN stack project I'm trying to connect mongodb connection but it is failing. Below is my code. Let me know if any changes required here. Thank you
In my connect.ts file
import { ...
-2
votes
2
answers
797
views
Choosing the right EC2 instance for three NodeJS Applications
I'm running three MEAN stack programmes. Each application receives over 10,000 monthly users. Could you please assist me in finding an EC2 instance for my apps?
I've been using a "t3.large" ...
1
vote
0
answers
76
views
How to package MEAN stack application as docker container with nginx?
I've made an app using Angular, NestJS (Node.js) and MongoDB and I'm wondering how to easily turn it into a simple docker container, which will contain nginx sever for serving the frontend app and ...
6
votes
1
answer
8k
views
ngrx error "Module '"@ngrx/effects"' has no exported member 'Effect'"
I trying to implement an effect in ngRx. I import ted "Effect" from "@ngrx/effects", but It showing the error "Module '"@ngrx/effects"' has no exported member '...
0
votes
0
answers
287
views
400 Bad Request using mean stack
on my application, i can register (name, email, role) and login. when i log in my account i can update my role. But when i want to save my change after the click button onSave(), i have
`400 Bad ...
0
votes
0
answers
114
views
MEAN Stack http PUT request issue
i'm pretty new in MEAN STACK.
I make my API REST under Nodejs Express and mongoodb.
I use Angular 14 as client.
I made a little project where user can register / login / display user informations.
Now ...
1
vote
0
answers
146
views
Angular Universal not running any functions after Refresh
This is my server.ts
I want to implement universal only in signin page.
Everything (Universal and all functionalitites) is working fine unless I refresh signin page.
Then page becomes pure static, ...
0
votes
1
answer
597
views
Mongodb query Dates returning as String of numbers
for my MEAN stack project I have to store a Date object in MongoDB for the start and end of a booking. the Date goes in just fine, in my collection it's show as:
booking_start: 2022-12-16T00:00:00.000+...
0
votes
0
answers
389
views
Log file keeps crashing the Mongodb portion of my project
So currently I am hosting a MEAN stack project on Linode cloud. Every few days the Mongodb side of my project seems to crash and the only way I can fix it is by logging into the project via WinSCP, ...
0
votes
1
answer
300
views
connect mongodb remote server to node js app
I have to connect node js app running on local machine(laptop) to mongodb running on deigtal ocean vps.
I changed bindip in mongodb conf file.
from local machine(laptop) the mongodb connection uri is ...
0
votes
0
answers
34
views
parsem array of string data into json
I have a folder of .TXT extensions file with plain text in it how can I insert that plain text into the MongoDB database using the mongoose and fs module in node js
const fs = require('fs');
var ...
0
votes
1
answer
79
views
Angular project component style don't want to display
i'm trying some css test on my project, but one of my component don't want to show his css.
This is my Angular structure :
my app.component.html
<div id="nav-bar">
<div id="...
0
votes
0
answers
86
views
Creating a contact list app(mean stack) not able to render data
Im trying to do a contact list app using mean stack to display contacts, add and delete them.
Im not able to render the contacts through ngfor from the component.ts and service.ts files.
Ive checked ...
1
vote
1
answer
305
views
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client MEAN stack [duplicate]
i'm trying on my API to set follow and unfollow function like social medias.
here is my user.controller.js follow function :
module.exports.follow = async (req, res) => {
if (!ObjectId.isValid(...
1
vote
1
answer
958
views
in nodejs which the best practice to use class based (using import) or function based ( using require) programming
I'm learning Nodejs and express. I've got some doubts about it, I don't understand which is the best practice for nodejs using import or require
-1
votes
1
answer
4k
views
TypeError: Cannot read properties of undefined (reading 'x') [duplicate]
I am new to MEAN stack, and trying to get some basic posts. I am getting TypeError: Cannot read properties of undefined (reading 'title') when issuing post. This works when changing todo-route.js ...
0
votes
2
answers
247
views
Visual Studio's terminal stops opening when the debugger is launched
I use Visual Studio's Node debugger on a website on the MEAN stack (Typescript on server side, Angular 2 on client side).
I was used to see VS terminal open when I "Run: script dev" and see ...
0
votes
0
answers
100
views
Change user icon style, If the user is logged in. (Angular & Node.js)
I am trying to change a user icon to green when the user is logged in, with Pusher or with Socket.io.
I have managed to do so before, but it was with SignalR.
I am now trying to find an alternative ...
-1
votes
1
answer
634
views
TypeError: Cannot read property ‘startsWith’ of undefined in MERN
I am developing a MERN stack web application. But I cannot build the server due to these errors. If anyone knows how to solve these error. Help me out to solve this.
0
votes
2
answers
92
views
mongoose cant display private message data
I am pretty new with mongoose & node.js and I am having an issue with displaying my users messages privately.
The message recipient, sender and message content is stored in the database.
but when ...
-2
votes
1
answer
187
views
Angular CORS and workflow [closed]
I have an Angular app on port 4200. I have the node server on port 300. I'm following a MEAN stack guide. To allow CORS, it suggests adding this to the server response:
app.use((req, res, next) => {...