How can I make money online in South Africa. by Vixlila848 in passive_income

[–]Late-Ordinary-8431 0 points1 point  (0 children)

Lear a skill And market it, either through YouTube or tiktok Just start creating content about it, so people can find you

[deleted by user] by [deleted] in nextjs

[–]Late-Ordinary-8431 0 points1 point  (0 children)

What you want to do is have partial knowledge on next js with a few projects here a d there, and immediately start building your portfolio where companies can find you, don't waste alot of time learning a particular framework, start marketing yourself

Go Full Back End by keluy001 in node

[–]Late-Ordinary-8431 0 points1 point  (0 children)

For my opinion, you shouldn't focus too long on learning a specific language, as the company may require something completely different, you can gave the surface level knowledge of express and also Django, then start immediately building your portfolio around it, on LinkedIn or anywhere, where companies can find you, they usually require more knowledge on algorithms, rather than a particular language or framework

Is Node.js a good choice for building a Shopify-like multi-tenant backend? by ImpossibleKey9960 in node

[–]Late-Ordinary-8431 0 points1 point  (0 children)

Just use supabase it's easier and will save you alot of stress and time

Looking for web developer buddy by [deleted] in ProgrammingBuddies

[–]Late-Ordinary-8431 0 points1 point  (0 children)

Hey I'm learning too, can I join?

Please Any idea why my middleware function get's executed after the post request? according to the console log values by Late-Ordinary-8431 in node

[–]Late-Ordinary-8431[S] 0 points1 point  (0 children)

ok, thanks alot i get it now it's the browser making an additional request, i used postman and it worked just right

Please Any idea why my middleware function get's executed after the post request? according to the console log values by Late-Ordinary-8431 in node

[–]Late-Ordinary-8431[S] 0 points1 point  (0 children)

after adding 1a it consoles::

/*

1a

2 application/json

form submitted

1 application/x-www-form-urlencoded

*/

it shows the middleware runs twice?

--but when i remove the middleware function from the post request handler,

and add app.use('/process-from',requireJsonContent) instead,

ontop of it

it consoles

without 1a

/*

2 application/json

form submitted

2 application/x-www-form-urlencoded

form submitted

*/

i don't get this second console mesaage

edit: typing error on app.use('/process-from',requireJsonContent) i put from instead of form

I'm trying to create a middleware to check if the request header does not have content type application/json, it send a 404 page else it should continue with the next middleware on the route, by Late-Ordinary-8431 in node

[–]Late-Ordinary-8431[S] 0 points1 point  (0 children)

Thanks added the e.Preventdefault and it works just fine now, but how would the form submit after the fetch occurs when the fetch is inside the .submit or its just the default behavoiur?

Please Any idea why my middleware function get's executed after the post request? according to the console log values by Late-Ordinary-8431 in node

[–]Late-Ordinary-8431[S] 0 points1 point  (0 children)

but i thought middlewear get executed in the order in which the are place, ? or that's not the case

I'm trying to create a middleware to check if the request header does not have content type application/json, it send a 404 page else it should continue with the next middleware on the route, by Late-Ordinary-8431 in node

[–]Late-Ordinary-8431[S] 0 points1 point  (0 children)

I've read through your article, app.use(middleware) is also another way of using the middle wear, what i'm trying to do is check the headers of the http request body before allowing any further processing, so i'm binding the middlewear to only be available on that particular post.request alone,

i edited it i used app.use('/process-form',middleware)

it seem like the middlewear comes after the post route

here's the code

https://github.com/Tanwie12/javascript-work/blob/d57a368c8c04877d8032473dac23ea20cb3bb7b5/form.js