₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,330,968 members, 8,448,014 topics. Date: Sunday, 19 July 2026 at 02:23 PM

Toggle theme

Cixak95211's Posts

Nairaland ForumCixak95211's ProfileCixak95211's Posts

1 2 3 4 5 6 7 8 9 10 11 12 13 (of 13 pages)

ProgrammingRe: Why Is It That The Things That Give Money In Tech Are Always Hidden? by cixak95211: 1:11pm On Nov 01, 2020
jaycpu:
is there any cheap way to host these stacks? I mean u can get a cheap server for php sites to host at relatively cheap price. any availability for the MERN stack
A server is a server . . and it doesn't matter what you host on it.
Technology MarketRe: SHOP ON EBAY & OTHER US ONLINE STORES - Doorstep Delivery In Nigeria by cixak95211:
@MetroBox
Can you tell me what the delay is?
If you were gonna be busy, then you could have at least informed me, and allowed me to make other choices
You are not even messaging me but still come here to update your thread.
You updated this thread 4 times today and yet not even a 'hello" to me on whatsapp, Nice !!!!
The time taken to update your thread could be used to at least message me.
It's starting to feel weird and I hope you give me an update today before it gets too late.
Travel AdsRe: Smyoot: Shop & Ship From China, USA, Dubai & UK (Express, Cargo & Shipping) by cixak95211: 6:40pm On Oct 26, 2020
BizBloke:
[color=#000033]Hi Cixak95211,
Welcome. You send us the links on WhatsApp and we give you a quote with an Estimated Time of Arrival. Please use the link below to reach out to us on WhatsApp.

Cheers![/color]
I have sent u multiple links on whatsapp but you aint communicating. Cheers
Travel AdsRe: Smyoot: Shop & Ship From China, USA, Dubai & UK (Express, Cargo & Shipping) by cixak95211: 2:48pm On Oct 24, 2020
how does your aliexpress purchase and shipping work? plus delivery timeframes...
CrimeRe: End SARS Protester Killed In Surulere (Graphic) by cixak95211: 4:27pm On Oct 12, 2020
EmptyGarden:
Ah ah, that belt too tight na. .....
Emergency 101 . . dont try to loosen the victim's belt . . .leave it as it is . . .
the victim shouldn't even be moved . . except by professionals
ProgrammingRe: Please How Do I Adjust This with Css by cixak95211: 7:01pm On Oct 10, 2020
Karleb:
Center is not an html5 tag.
Thanks for correcting him . . center was deprecated as afar back as HMTL4 in favor of text-align property . .
Was very disappointed he even said "9ja devs" and even far disappointed, somebody would mention
center and using standalone-tags in 2020 when we have flexbox and grids
ProgrammingRe: Please How Do I Adjust This with Css by cixak95211: 1:54pm On Oct 10, 2020
1. Create a parent container to hold a) niaraland div b)form div

2. Set the parent container to display: flex AND direction to be flex column AND justify content by center AND align items by center

3. Optional steps: The form div that contains username and password input, can be set to also display flex, or you could just stack each one on top of the other and seperate them using margin-top.

I suggest you go the flex route, because it will make your page responsive at all breakpoints i.e. they will shrink and grow along with the view port

Using a utility-first framework like tailwindcss, you would to this

<div className="flex flex-col justify-center items-center w-5/10 mx-auto"
<div className="flex flex-col justify-center items-center">
<input name="username" type="text" id="username" placeholder="username" className="h-10 rounded-lg"/>
<input name="password" type="password" id="password" placeholder="password" className="h-10 rounded-lg mt-6"/>

//......more divs as u deem fit here
</div>
</div>
ProgrammingRe: Sms Api by cixak95211: 9:35pm On Oct 07, 2020
If it's just for verification e.g. OTP, then you can use FireBase . . else
i wish you goodluck . . i am stuck with twilio just like you.
at least, they allow me use Amazon Polly , so OTPs can go as phone calls instead of regular text messages
ProgrammingRe: Verifyme.ng API by cixak95211: 12:09pm On Sep 29, 2020
We've seen it , thanks, dont worry, we'll try it out
ProgrammingRe: I Need A Thrift App by cixak95211: 1:51pm On Sep 27, 2020
What manner of "fuckery" is this? huh huh
ProgrammingRe: PHP Or Node JS? Here's My Honest Opinion by cixak95211: 1:50pm On Sep 27, 2020
Spot on at nairaland.js. How do you know song that was extremely good? Every artiste wants do to a remix or cover, right?
How do you know a language that is good? Every tom d and harry, wants to write a framework for it; they want a piece of the cake.
Thats your answer!
ProgrammingRe: My New Projects by cixak95211: 1:44pm On Sep 27, 2020
Those are not projects, please !!!!
If you tendered those during an interview, you would be flung from the highest storey in the building.
Well it starts from somewhere . . .And congratulations on taking the very first bold step.
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 6:56pm On Sep 22, 2020
crunchyDope:
boss you are too good..

instead of the webhook am using "fs.watch" which eliminates the cron job tasks..and just re-require the json file .
I'm flattered. Thank you.
If you are referring to the node js' fs.watch, yeah that works fine . . i like to use webhooks generally cos they are "language & platform agnostic"
I should prolly start a Youtube channel one of these days.
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 9:49am On Sep 22, 2020
crunchyDope:
ok boss

i was thinking about the whole running process of this node js,and d updating the code thingy.

so am thinking abt having a core(app) running that checks the config file every 15 minutes.

when it checks the config file? it could see a new file to run...lets say there is a "{
new: " new new new"
}".

it would take that new and load it, and call the init() on it..

now after another 15 minutes it would check that file and voila! that new still has the same file instead of {new:""}..

so how do i change the new in the config file,

am using the config library
There is really no need to be checking the config every 15 mins, that is a cron job. Yes, crons have their use case but in this case, why dont you make whatever changes your config, send a webhook event. Saying "hello, config has been changed"
Now the server will just sit idle and wait to receive that webhook event and when it does receive it, it knows the config has been changed and can then proceed according to your demands. Just in case you were wondering, during ci/cd, the server does not run a cron job every now and then to see if a new branch or pull request has been merged, Rather, it sits idle and wait for that message to come in; and when it does come in, it looks at the message details and handles the request accordingly.
You save more server resources this way. I hope this comment has helped you.
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 5:32pm On Sep 21, 2020
Babtunz:
Thanks for you swift response
Yeah, I got your mail, but currently I do not have access to Whatsapp, I use Gmail and Twitter these days. Will it be okay if I send my Twitter handle or you would like to continue with the e-mail?

Please let me know, thanks.
Not a problem, Any one works, sir !
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 5:31pm On Sep 21, 2020
crunchyDope:
boss biko , how do yo change a value in a config file{dev or prod}?
(programmatically)
huh
i dont understand, why would u be changing values in production? Or you mean change values of a sample config file?
Give me on clear use case.
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 10:05am On Sep 19, 2020
Babtunz:
Hi @cixak95211, I really learnt a bunch of stuff from your comment and I'd be happy if you'll share you social handles so I can connect with, please...

I'm a starter with Node.js but I'm confident with my JS scripts and I can catch up so fast! I'm willing to tap from your wealth of knowledge and experience please, if you don't mind. Please revert
Do you have an email I could mail 'em to ?
ProgrammingRe: I Need A Fullstack Wordpress Devloper That Can Code Anything In Wordpress by cixak95211: 11:26pm On Sep 17, 2020
I'm just here to see screenshots of the repos and nothing more. Please oblige me, the both of you!
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 4:21pm On Sep 16, 2020
codeigniter:
that great, at least you have job security. what would u advice a newbie to do? hunt for jobs, freelance or build their own products. u seem more experienced
You arent a newbie ... are you?
For a newbie . . ., I'll advise they try to rack up hours working in a production environment. Coding in your bedroom , doing a todo app is way drastic in change than when coding for production and enterprise uses cases .e.g ur custom tic-tac-toe app might not require custom domain or workspace implementation, but for productions, customers will require it. This single task alone will take you a to a whole new level of computing and it's gang of wahala that it comes with. Then when you must have racked up quite some experience, you start thinking as a product engineer and not a software engineer. A SE can write code, but a PE can deliver a fantastic product that has a market and passes customer validation.
Building a product as a SE alone is a recipe for disaster, it takes a more than writing codes. At this stage, you should try do one of two things for yourself. The first few might fail, dont give up. The next one will be a banger !!!
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 3:04am On Sep 16, 2020
codeigniter:
It's great that u think at scale, and I understand what u are driving at. But what i saying is about saving most. Do u work for company or freelance
I work for a company; I don't freelance cos I
have my own as well.
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 8:04pm On Sep 15, 2020
codeigniter:
ok I get It, I haven't really built any node applications using jwt. u were right when u said there is no need to make the application stateful when using jwt, what I was saying was instead using in memory db, which means u might be using another db e.g mongodb. I would rather create a session, to save cost, but if I don't a db then I can use redis or others. well I don't think I will go back to nodejs, except maybe on jobs, but I won't use for my personal projects
In memory dbs like Redis and Memcached are up to 300% faster in i/o operations that disk-based db like mongodb, mysql; because they reside in volatile RAM. Although you could persist the data once in a while, if persistence matters to you . . That's why it is preferred and it also prevents you from making the call to the DB [round-trip calling]. Secondly, sessions dont scale well, at least, vertically. Imagine you have deployed your app to 10 database replicas ....This can be disastrous, cos the first login request could go to Database A
and if you're doing a round-robin, the next request, for that same user could go to Database E
Now E doesnt hold the login session, it's held in A. To beat this problem, you have to sync your session data across all 10 Databases each time a user logs in, that's 10 round-trip calls. And you might ask why 10 DBS. . Facebook saves as of 2019, 1.5 petabytes of storage, that is not gonna fit into one database, not even into 10,000 databases, if they want efficiency
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 6:28pm On Sep 15, 2020
codeigniter:
that would work but it going to add more to d bill. the problem with node js jwt is that it doesn't create a table with the application/backend which makes it difficult to invalidate the token. anyways, I would prefer to use a table in my db.
I just gave you a summary of how to invalidate tokens in node js . Creating tables to look up data will make the application stateful . . . That is called a session. Its fine if you want to go that way. Using jwts, doesnt require a session, in short, [using a session kills the original intention of JWTs] ,therefore keeping the application stateless. Its similar to using callbacks inside a try/catch blocks. which is an anti-pattern. It kills the need for that. There are myriads of myriads of web applications that use jwt for authentication and dont have issues. it might seem hard for you, perhaps cos u are new to nodejs, but like i said earlier, as your knowledge of nodejs grows, you will see it was pretty easy after all.
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 1:30pm On Sep 15, 2020
codeigniter:
yes, coming from drf makes it easier because u will have understood the concepts which is the most important thing, but drf takes care of all the manual work, e.g I use permission based class and add an auth library at the settings which will depend on drf token table, drf is very easy if u are using class based view. jwt is easier than password but when I was doing MERN, i read that the token doesn't expire and if another person access ur device they can easily copy the token. I built a personalized API auth for flask I use decorators to make sure it can be used by anyone. i might release to make developer more lazy! lol. why did u switch to node.js, I would like to know I am very u will miss Django orm, except if u use mongoose
Authentication, like you said, is one of the hardest things in Nodejs, especially if you want to do it properly. Most people just whip up a JWT -based token and thats' all. but it comes with a problem, e.g how to invalidate a token. The token does expire. But the problem is what if user permissions are changed before the token expires e..g downgrading a user. If the user has saved the token somehow, they can still use it access to former [now obsolete] permissions.
So you must always 1.) get fresh user's tats from the DB at authenticated request and NOT RELY on what the jwt says, even if yes, you did sign it and it was not tampered i.e. the signature is intact and 2.) implement an in-memory store like Memcached and Redis to keep blacklisted tokens till they expire.,,, a very fast way to invalidate tokens. It doesn end there.
You should 3.) implement refresh tokens + access token architecture, this way it's easy to mitigate an attack when somebody steals your token or logs in from another device and/or ip address, however you want it.
Stages #2 and especially #3 is where it gets pretty difficult for newbies. But as with other things in life, perfections comes via practice.
ProgrammingRe: Don't Joke With These Math Topics If You Want To Be A Successful Game Dev by cixak95211: 3:05am On Sep 14, 2020
DanTheGeek:
@cixak95211 you too join the group o. You are the last one we are waiting for.
I'm there.
ProgrammingRe: [DELETED] by cixak95211: 10:35pm On Sep 13, 2020
and when cqeor goes to death, you'll say its your village people.
@DanTheGeek . . . don't you know you're supposed to keep a professional image out there. Stuffs like these should be local/offline gist between you and friends. Imagine investors just doing a background check on you, and find this page. Professionalism just went to ashes!
You have a brand, you should try to build and protect it, not yap online about abused substances. Good luck !
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 11:28pm On Sep 12, 2020
Lmao, i remember that dude. It was funny as hell.
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 10:48pm On Sep 12, 2020
^^ Hell yea, no disputing of those facts. Which in turn has led to too many adulterated engineers . . .A former CTO once told me, Nodejs is the language of the future, invest in your future now. Maybe that an exaggeration, but we all know the "20k gang", as I like to call them, both within and outside Nairaland, all gained their founding in php and it's gang of companies e.g. wordpress.
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 2:29pm On Sep 12, 2020
DanTheGeek:
Great. Nice meeting another JavaScript ninja in the house. I do JavaScript too but MERN also some PHP, Python and Golang.
I was an early adopter of php, during the hay-days of Zend and Symfony . . . But have since hung my boots
I wouldnt touch php with a 100-foot pole now. We have both gone our separate ways.
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 2:19pm On Sep 12, 2020
DanTheGeek:
You've said it all. I laughed when I read the second question though. Production servers very rarely reboot (except when using a PaaS provider) except server providers like Heroku but even Heroku has a json file it runs like a daemon everytime the app restarts. So that problem is solved. On a production server on a service like AWS you probably have automation sorted out as part of the software infrastructure. Thanks for this insightful answer.

May I know your stack?
Software Engineer . . . MEAN, PERN, but more of MERN
Cloud Engineer [GCP, AWS]
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 2:16pm On Sep 12, 2020
crunchyDope:
you guys are still using the word rarely which means not "impossible".. so this is how i sleep knowing my crawlers might one day fail grin
You worry too much about the less important stuffs. There are more important stuffs to worry about e.g. how to scale up and down and keep costs low. Well to answer your questions. If you want your app to always stay online 24/7/365 even in the event of a terrorist attack or nuclear bomb blast, then you need to invest in "geo redundancy". Servers are divided into geographical location and zones. e.g. Eu-west-2 which stand for London in AWS [amazon] and Us-central-1 which stands for Iowa [Google]
Those are now divided into zones, i.e. cities which are at least 100km apart from each other e.g. eu-west2-a, eu-west-2b, eu-west-3b . . repeat for us-central-1a u get the idea . . if you wanna make your app geo-redundant, you will need to deploy your app in multiple servers across different zones and countries. you might deploy it in 12 countries across the world . I hope you have money for that, cos the bill will be in hundreds of thousands of dollars each month.
SO if Russia goes down, USA is stil online, ur app is still working. If CHina blows USA, the one is London is still workin . . London has fallen, then the one in South Africa is stil online . . if the whole 12 countries go down, then you know its the end of the world and nobody would be using the app anyways when we are all dead.
Now the question is? Can yo afford it? So better stick to a single server, and when you make cash, like Jeff and Mark, you can even create your own server farms which is what they all did. Goodluck
ProgrammingRe: Don't Joke With These Math Topics If You Want To Be A Successful Game Dev by cixak95211: 12:01pm On Sep 12, 2020
stanliwise:
Please Goan learn what API Means
Application programming interface. If I write an app and I want other app to communicate to my app. I write an api, set of functions. Api are between apps not languages
This right here, made my post my comment, because looking at it already tells you the POST [no pun intended] refers to Restful APIs,
and [restless, which Dan pointed out you missed]. Maybe there was misunderstanding somewhere along the line, but I believe we all get it now, yeah?
We're cool [in Dan's voice] !
ProgrammingRe: Node Js Gurus @nswer This Biko by cixak95211: 11:49am On Sep 12, 2020
Xperienx:
This answer in beyond the scope of the OP. He's absolute and saying all these could even confuse him the more.
True that, but his curiosity kept going deeper and i just had to oblige him, and even told him it would not make sense now
but it will surely do, if he keeps on keeping on.

1 2 3 4 5 6 7 8 9 10 11 12 13 (of 13 pages)