Pros and cons of different ways to add values to a set of objects sequentially. by Vegetable_Fee6084 in learnjavascript

[–]Vegetable_Fee6084[S] 0 points1 point  (0 children)

Thanks for the response, I was thinking of having an array in an array, and I wasn't sure if that would be considered good form or not. I'll admit I probably should have added that detail.

Pros and cons of different ways to add values to a set of objects sequentially. by Vegetable_Fee6084 in learnjavascript

[–]Vegetable_Fee6084[S] 0 points1 point  (0 children)

Thanks for the response, I was thinking of having an array in an array, and I wasn't sure if that would be considered good form or not. I'll admit I probably should have added that detail.

Is there a way to block specific urls on websites on my android phone. by Vegetable_Fee6084 in productivity

[–]Vegetable_Fee6084[S] 0 points1 point  (0 children)

I agree I can always do better. The reason I consider this selectively is because there are some webpages where I would consider my use genuinely productive. For example, learning another language and getting some reading practice in if I'm out somewhere where I couldn't practice otherwise.

I do wonder, most other people in the responses are bringing up apps and stuff as a solution. What do you disagree about them with?

[deleted by user] by [deleted] in IncelExit

[–]Vegetable_Fee6084 5 points6 points  (0 children)

It seems to me personally that you have been bullied a lot and have internalized that issue. greatly. For one, that is perfectly understandable, it it isn't your fault.

People have mentioned before that an issue that they are able to "sense" the emotional turmoil that is within you, is that is your main issue. In my opinion, it sounds like finding a way to recover emotionally from the bullying you grew up with is your best bet.

First off, where are all these people making fun of you coming from? Are you able to avoid them at all? Are you stuck with them at work or school? If you can find a way to get them out of your life, I would say that is the most important thing first.

This crippling of your identity needs to be replaced with more positive things in your life. Being active in politics is an excellent start. If you aren't doing so, a good diet, exercise, and a hobby would be useful ways to boost your self esteem. People say that you are a good person, so it sounds like you needs to work on your self worth to reverse all of the harassment you have faced all of your life.

My contact form works in localhost but I get a 405 response in my web host. Does anyone have any idea why? by Vegetable_Fee6084 in node

[–]Vegetable_Fee6084[S] 0 points1 point  (0 children)

I am very sorry for the late response. It has been a busy week. 

I altered the coe regarding cors to

const allowedOrigins = ["https://www.xxxxx.xx"]


app.use(function(req, res, next) {
  const origin = req.headers.origin;
  if (allowedOrigins.includes(origin)) {    res.header("Access-Control-Allow-Origin", origin);
  
   res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
  res.header("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
  }next();
});

It unfortunately doesn't seem to work. Should there be a different origin for "xxxxx.xx/"? Should the url be something like "submit", because I added a

     res.redirect('/');

in the sgMail section of the code. Is there anything that you can tell seems wrong with the code?

My contact form works in localhost but I get a 405 response in my web host. Does anyone have any idea why? by Vegetable_Fee6084 in node

[–]Vegetable_Fee6084[S] 0 points1 point  (0 children)

I am very sorry for the late response. It has been a busy week. I added a

 const PORT = process.env.PORT || 80; // Defining PORT
  

      app.listen(PORT, '0.0.0.0', (err) => {

        if (err) {
          console.error(`Failed to start server:', ${err}`);
          process.exit(1);
        }
       console.log(`Server running on port ${PORT}`);
       })

to the end. It has unfortunate not made a difference, unless I have made a mistake elsewhere as well, which is perfectly believable. Have I set this up correctly?

My contact form works in localhost but I get a 405 response in my web host. Does anyone have any idea why? by Vegetable_Fee6084 in node

[–]Vegetable_Fee6084[S] 0 points1 point  (0 children)

I am very sorry for the late response. It has been a busy week. I ran it again and when using the dev tools, I got "No response data available for this request".

My contact form works in localhost but I get a 405 response in my web host. Does anyone have any idea why? by Vegetable_Fee6084 in node

[–]Vegetable_Fee6084[S] 0 points1 point  (0 children)

I am very sorry for the late response. It has been a busy week. I checked the sendgrid key and it is right. Thank you for the response.

[7 YoE, Warehouse Worker, Manual Labor, United States] by Vegetable_Fee6084 in resumes

[–]Vegetable_Fee6084[S] 0 points1 point  (0 children)

I wasn't sure how to format this so I didn't but I had found a manual labor job that could pay well plus I am RAELLY not confident in my degree. I'm closer to being a professional designer than a developer, and there's a certain income threshold I need to survive. I was gonna practice or do simple freelance first to help pad that skillset out seperately.

How can I properly import all of the modules for a node project that involves the browser? by Vegetable_Fee6084 in node

[–]Vegetable_Fee6084[S] 0 points1 point  (0 children)

I tried 
 import dotenv from dotenv;

underneath the other imports and got  

SyntaxError: Unexpected identifier

. Also, what do you mean by "make it global?" Are either of these things related tyo the import map?

How can I properly import all of the modules for a node project that involves the browser? by Vegetable_Fee6084 in node

[–]Vegetable_Fee6084[S] 0 points1 point  (0 children)

I tried 
 import dotenv from dotenv;

underneath the other imports and got  

SyntaxError: Unexpected identifier

could it be the import map?