« first day (3141 days earlier)      last day (1823 days later) » 
03:00 - 18:0018:00 - 00:00

6:16 PM
what happened to quark
 
quark was a worse name
I did lots of refactoring and cleanup to prepare for a talk next month
There's still some stuff to do on it, but it's in pretty good shape now
 
6:56 PM
@AllanRaquin I figured out your problem
why are you using weird method declarations?
instead of enter (el, done) you do enter(args)
 
yea, I assumed that was a vue thing or he just doesn't understand arguments keyword
 
and in the HTML you specify enter(arguments) when otherwise you could just reference the function itself
yeah I dunno but that was his problem
 
does vue internally call that function such that arguments would exist?
:enter="foo(arguments)" is arguments defined in whatever wraps up :enter?
or is it called in some obtuse way that it would not exist.
I assume no, because it doesn't error
 
it looks like it wraps its two arguments into an array that it passes into that one param
but that's why it doesn't think the function is handling the callback
because the function is using the non-callback overload
I mean, I don't know. It's weird because it still does pass the callback in, just as the second element of the array
 
arguments is a keyword
 
7:00 PM
anyway here is the answer
 
it's all the arguments of the function
 
oh that's it then
freakin js
 
it's useful
function sum() {
  return [...arguments].reduce( (a,b) => a+b );
}
 
I doubt Allan was intending that
 
sum(1,2,3,54,5);
 
7:01 PM
I mean maybe he was
revised answer without my logging
 
Query about electron packages. I am exploring the NodeJS+Electron world just for fun, not a serious issue. Some electron based programs (like VScode) has api-ms-win* dll file but some do not. I know what those dll are but want to know why they present in some packages?
 
@Biswapriyo Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
as someone who has never touched Electron at all, I'm guessing those are win32 apis
vsc does some highly optimized system-level work to keep its intellisense fast, iirc
so maybe that's related
 
7:42 PM
I don't deal with windows.
but I assume they are akin to gyp
 
-1
Q: Promises must be handled appropriately when trying firebase deploy

NCT 127I am working with firebase cloud functions and am trying to deploy some code. The problem is I am, according to the error, not handling promises appropriately. So my question is where in the code below should I be using promises and how. export const onPostUpdate = functions.database .ref('/Po...

 
 
1 hour later…
8:51 PM
@JBis yeah it's nothing special. just a cli tool. I'm going to add options to it to init with webpack and maybe other stuff
you could always load up that dll and see what it does
 
Anyone have a node web server boilerplate they use?
I want to start using node for web server but iirc you have to create the web server instead of having one made for you like Apache. (You have to create the apache).
 
uh
i use apache/nginx AND node
never just node
unless it's development
 
9:06 PM
how does that work?
 
apache/nginx are just better at some things
 
(I know you can use them in parallel, but I did not know you can use them with each other)
 
you reverse proxy from domain.com:80 to localhost:3000 or whatever
 
I mean... usually you use a reverse proxy
 
use nginx or apache to serve your static files, handle redirects, rewrites, typical http stuffs
 
9:08 PM
^yep pretty much
 
Yeah, that's what I mean. Apache isnt gonna handle what files run etc. You still have to detect what file is requested, etc.
 
anything that isn't handled by apache just routes to :3000
where node deals with it
 
you can also host multiple sites on one server or have multiple servers for one site, etc
nginx specifically, idk enough about apache on that type of stuff
 
When you use something like php, you just write in /index.php and apache handles running that when it is requested
 
I like nginx with node better than apache
 
9:10 PM
With node if you want /index.js you have to write the logic to decide what to run
 
wdym "write the logic"?
 
Correct me if I am wrong, but whoever is listening on domain.tld:3000 has to decide what to do with the request.
 
you could even use node to redirect to apache or nginx if you want but you probably shouldn't lmao
@JBis yes
well
whatever the nameservers are pointing at
so if they point at x.x.x.x:80...
 
So I am wondering if there is a boilerplate "listener" that you suggest.
 
then whatever is exposed on port 80 of the IP x.x.x.x (well the server that has IP x.x.x.x
@JBis yes, ngnix lol
 
9:13 PM
@DavidKamer No, for node.
 
you just go with most of the defaults iirc
@JBis you'd just start it on port 80 or 443
then open that port on the server
 
🤦‍♂️
 
not advised tho
 
I am not explaining this well.
 
you want a reverse proxy written in node?
 
9:14 PM
No.
 
maybe you're looking for pm2
it's not at all what I think you're asking for, but helps if you're not going to containorize node
 
What does Nginx do in your config?
 
nginx adds a layer of abstraction between my running service and the internet
and I think I use it to handle https generally
 
rev proxy then?
 
yeah, but iirc I usually use it with certbot to handle https and redirects to https
 
9:17 PM
Is it a simple if (request.match(/\/node\/.*/)) { this.requesturl.port = 3000; redirect(this.requesturl)}
 
well, yes, there's a boilerplate listener for an http server
Most people use express
 
^
yeah that
 
but it isn't a requirement
 
HTTP Server (Aka a webserver)
 
9:18 PM
Do y'all suggest using express? What are the limitations? Why might I not use it?
 
i've always used express
supposedly there's another one by the same people
newer
but i haven't messed with it
 
btw what I originally meant is the fact that you have to do this:
app.all('/', function (req, res) {
  res.send('hello world')
})
you have to listen for /
 
right
well
you don't have to
you can use apache or nginx to redirect / to /index.html, and serve that as a static file
 
Is there a way to automatically listen so you don't have to write out each path in node?
 
use something like golang for something likek that imo
 
9:22 PM
If the path is handled by node.js, it has to be handled by node.js
 
!!afk
 
if it's a static file, such as a .js file for the client, that's what express.static is for
or apache serving static files
it's not like php where you just create a home.js and go to /home
 
Assuming it is not static, can I make it similar to apache. if /bla.js is request then look for /bla.js etc.
 
yeah no
you can certainly structure your node.js app to read the /bla.js path and then execute code at that path... i wouldn't recommend it though
 
Grr. Thats annoying. So, to confirm, I need to write out every path?
 
9:25 PM
The reason i wouldn't recommend it is nothing would stop the user from, say, going to /app.js unless you specified which ones were allowed/not allowed
but then we're back at square one
 
blacklisting is easier than whitelisting I think
 
i would also be concerned with the browser, or the server, making assumptions about the return content type based on the extension
 
requestpath + ".js"
no extension :)
But anyway. Do you have an example App.js gist so I can see structure?
 
I don't, but, it's usually not all that different from a react app
you'll have stuff like /routes, /components (or controllers/models, whatever you want to callem), /lib,
 
Awesome.
Next, what do you suggest for html stuff? Pug or something else?
If possible, I would like something similar to php.
 
9:32 PM
The last one i did used JSX
 
<h1><?= $bla; ?></h1>
 
react server-side rendering
 
I don't want to use react if possible. I would use JSX just not react.
 
prior to that, i preferred handlebars
or similar
i think handlebars has been replaced with something else since then
maybe not
but it's jsx'ish
 
Handlebars looks similar
Ok I think that answers all my questions (for now)
Thanks!
 
10:18 PM
need a templating lang?
have you tried uhh
PHP
how about JSP
ugh
 
@forresthopkinsa ? With node?
 
Kidding
You'll have a harder time doing JSP with node anyway
 
oh lol. thats how you know I'm so unfamiliar with the tech ;)
 
it's fine. Hopefully you'll never have to use JSP anyway
 
i've been trying to find a way to integrate the firebase admin sdk into coldfusion, currently the two closest options are A: jsp, and B: sending an http request to node.js
because coldfusion files can invoke jsp files
 
10:25 PM
oh man
you have to do jsp
the possibilities are endless
use GraalVM to integrate the JSPs with Node
 
Are there prepared statements in node, this library escapes instead of preparing? In php I always prepared statements, even after sanitizing them, to prevent injection
Little scared to just escape, been drilled into my brain to always prepare
 
yes
just maybe not in that module
lately i've been using something else,
if only i can remember what it was
some ORM
err, querybuilder
knex
 
10:50 PM
hey @jbis
 
 
11:04 PM
hello
Can anyone point me in the direction of good reading material on JavaScript encryption for source code padding?
 
11:17 PM
If you encrypt your client side code then your client can't read it. However you can obfuscate it
 
@JBis Thank you, I'll look into it. I just found out my old site got cloned and now that I'm making a for profit one I want to make it alittle bit harder to do.
I was thinking of disabling ways to get to inspect, but my site uses right click as a function.
 
@StephanS No. Disabling right click does absolutely nothing.
There are so many ways to bypass that, I don't even know where to start.
 
I'm trying to use a Vue component through a CDN with <script> tags instead of using modules, but it doesn't seem to work out of the box. Is there a standard way of using a module through a CDN or is it implementation specific? It's the github.com/fullcalendar/fullcalendar-vue unpkg.com/@fullcalendar/vue@4.1.0 btw
 
11:43 PM
@JBis would it be helpful to create a JavaScript script of my own to encrypt and decrypt the HTML and CSS then obfuscate the JavaScript.... so the whole site is secured?
 
@StephanS No.
Then I could just use developer tools or the js directly to decrypt the HTML CSS
Don't try to protect your client side code. It will almost never work. You can obfuscate it if you would like, randomize css class and js etc. but thats about it. No encryption or anything else. Just put a copyright on top and say "Please don't steal my code". If you want you can implement a paper town like thing.
Fictitious or fake entries are deliberately incorrect entries in reference works such as dictionaries, encyclopedias, maps, and directories. There are more specific terms for particular kinds of fictitious entry, such as Mountweazel, trap street, paper street, paper town, phantom settlement, and nihilartikel.Fictitious entries are included either as a humorous hoax or as a copyright trap to reveal subsequent plagiarism or copyright infringement. == Terminology == The neologism Mountweazel was coined by The New Yorker based on a fictitious biographical entry in the 1975 New Columbia Encyclopedia...
 
Ok, thank you.
 
This might be better for a full question -- but bare with me if you could... I have a string coming from a OLE DB from `node-adodb` it's coming from acesss DB. I have no idea what encoding it is but I do know the application that used to interact with it ( it's not lost) just shoved this binary data into this VARCHAR and called zlib on it... when doing this, it doesn't seem to work and thus, something is probably encoding it on the way out.

Whenever I try and make a buffer to inspect it, I am forced to specify an encoding which I assume will do some transformation on it. Is there way for
 
hey
 
@bluejayke Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
11:54 PM
is any1 there
like at all
 
hello
 
oh hi! finnaly some1
 
you are alone in this world, my son
 
brutal
so what are these chat rooms for
I just randomly found it
 
cocaine
 
11:56 PM
oh great I Was hopeing
so do u guys know anything about javascript
 
@bluejayke you were in chat for like 5min –.–
 
nope nothing
 
what's javascript
 
I've never heard of it
 
idk I could never quite grind it right
too much milk
 
11:57 PM
@bluejayke No. If you are looking for JavaScript help. Go to the JavaScript chat.
 
what is this chat
wait...lol
 
should of linked it to java chat XD
 
wow
does Jint count as JavaScript
'cause I was having some issues
<I'll take that as a maybe>
 
Ask. If its off topic someone will complain.
 
03:00 - 18:0018:00 - 00:00

« first day (3141 days earlier)      last day (1823 days later) »