« first day (2861 days earlier)      last day (2312 days later) » 

15:00
"Grace period ends in 23 hours" Plenty of time
k, I'll wait until < 1 hour and ask again :)
updooted
@Maartenw thanks!
@BenjaminGruenbaum huh?
Aww thanks @BadgerCat
15:06
old but just saw it
@Abhi that's @ShrekOverflow's real name, I was just being polite
@William lmao
oh okay. Happy birthday, Abhi
@ShrekOverflow happy birthday, mate :)
Guy calls us to apply for a PHP backend job. Mentions in the phone interview that he thinks PHP is unsuitable for large applications and not secure. His answer when asked what he would use instead: JavaScript
the php has a twitter bought for top stars very funny sorry
not top stars, they got a !!twitter command
15:15
@ShrekOverflow happy Birthday man!
or !!tweet I guess
well we need one then
no, we really don't
you can put one in if you want to
but I don't think that we "need" one
I don't think most ROs would even want one
I def don't want the bot tied to it
Twitter never plays well with this room
15:18
good point
considering the history of our room your probably right
I don't use twitter
I don't think the WebSocket is used to send messages.
It appears a request is made to
/new
@JBis just look at cap
Well I assume she works that way
Twitter is a wasteland of "my free speech means more than yours"
15:24
@William ?
Thanks all
function bt(e) {
        var t,
            i,
            a;
        -1 != e.attr("id").search(/^pending-message-/) ? (t = "/chats/" + s.id + "/messages/new", i = yt(e), a = function() {
            var t = e.closest(".monologue");
            e.remove(), M(t)
        }) : (t = "/messages/" + e.messageId(), a = function() {
            e.data("source", null).removeClass("pending"), e.find(".content").html(e.data("previous_content")), e.data("previous_content", null)
        }, i = function(t) {
@William was looking at that yesterday will take another look
 sendToRoom: function (text, roomid) {
        IO.xhr({
            url: '/chats/' + roomid + '/messages/new',
            data: {
                text: text,
                fkey: fkey().fkey
            },
            method: 'POST',
            complete: complete
        });
I give up for now
will try again tomorrow
15:35
@ShrekOverflow you waited for everyone to finish saying so you can just say "Thanks all", didn't you
does anyone debug npm scripts through webstorm? I can run my configuration, but debugging session stops after waiting to connect to localhost. The script is a webpack compilation routine. Why is it trying to launch a server / connect to localhost? Do npm scripts need a running node server?
you're trying to actually debug the webpack script itself?
Here's a dumb question that may scream out. I'm trying to move some of our JS into modules and fed through babel, but there's also a bunch of inline code in templates that I don't want to break as both files & inline use jQuery. Should/can I install jQuery using npm and require it for the JS files, and then also have a jquery.js file which requires jQuery into the global scope for the inline crap?
@SterlingArcher All speech is free, but some is more free than others
sure, you're free to say whatever you want on your own platform :P
15:45
@forresthopkinsa no, rather the custom compilation script given from the starter kit that was used by the project when starting.
there's a strange path error, and I'd like to use breakpoints to step through the script
> If you’re using WebStorm 2017.1 or above, please ignore this blog post. To debug an app, ensure that the source maps are enabled inyour webpack.conf.js, specify the URL your app is running on in the JavaScript debug configuration and you’re ready to go.
sorry if I'm unclear: there are several javascript files that customize the compilation of the code, and webpack is part of the process.
compilation is launched through a bin/compile.js file that imports several other javascripts object that configure the app, build environment and at some point run webpack.
again: I am not debugging the app, but the compilation scripts.
yeah ok I get you now
I misunderstood
:) sorry for the emphasis
no problem, I wasn't paying attention lol
yeah anyway I actually don't know how to do that either, let me know if you find a solution because I'd like to know as well hahaha
15:50
I'd hazard the problem is pebkac and I just don't really understand npm, but I will indeed report back
16:16
Hello, im tryng puppeteer, im having problems with clicking a list thumbnails, how should i select them for clicking after i get the list?
const puppeteer = require('puppeteer');


(async function main() {
	try {

	  const browser = await puppeteer.launch({
		  headless: false,
	  })

	  const page = await browser.newPage()

	  await page.goto('https://www.amazon.com/AmazonBasics-HL-002565-Mid-Back-Mesh-Chair/dp/B00IIFW2L4/ref=sr_1_2?ie=UTF8&qid=1534357428&sr=8-2&keywords=chair&smid=ATVPDKIKX0DER', { timeout: 0, waitUntil: 'load'})

	  await page.waitForSelector('#altImages')
	  const thumbnails = await page.$$('#altImages > ul > li')
Morning
user1596138
Drawing and tallying this shit has been a pita lol
what is pita
user1596138
Pain in the ass.
16:27
oh lol
I was thinking u meant the bread
is ur avi a dog?
user1596138
lmao
user1596138
Yeah, it's Hank Hill's dog.
cool. Working on anything cool?!
user1596138
That pita recursive tree in the screnshot
Im working on an electron project with Vue.
user1596138
16:28
I'm doing React
Nice. I'm learning react on the side. Good luck!
@William It is something related to how they match the csp url with request :

Refused to connect to 'https://www.youtube.com/my_videos?o=U&vmo=private&sq=is%3Aprivate&pi=1' because it violates the following Content Security Policy directive: "connect-src https://www.youtube.com/*".
somehow query parameters in url mess up things ^^
user1596138
16:46
I been doing react for like 3+ years but I'd never done anything resursive within and ran into some stupid mistakes lol
user1596138
Worked out tho. Was probably harder to get psuedo element borders all over the place according to the design
wow 3+ years. I can't think of anything I've done for three years.
user1596138
In all browsers including IE11 lmao
IE is trash
user1596138
Yes.
16:48
I guess I gotta keep at it. Also want to at some point answer questions on SO.
user1596138
Backend is sending me like 4mb of JSON to render and IE devtools won't even open lol
oh no. I thought IE was no longer supported?
isn't the new version called edge or something?
Do all callbacks have an err and response arg?
@jy95 if you can't do what you want with a bookmarklet it likely can't be done. Chrome apps and extensions are limitng more so then a bookmark with a couple exceptions like file system access.
Chrome apps especially are considered a joke and well complete failure on Google's part
Which is why they are shutting it down for everything but for chrome os
IE is consistent trash though
I liked some chrome apps
some browsers are inconistently trash which can be even more annoynig
16:57
like postman
@William I think you consider them that hahaha
they might not be around in 5 years but I don't think that they were a complete failure; they accomplished what they set out to do
the web is just moving in a different direction now
Hi forrest
what's up @ex080
@forresthopkinsa NM, doing electron. You?
been pretty busy with work
17:00
nice
however my current task with my vue project at home is authentication
trying to power it with spring security, but that's going kinda weird since SpringSec is for mvc apps
I am using vue... but having trouble using native node modules with it in my electron project.
haven't used electron yet
I like it so far.
it's okay.
there are things about it I would probably have not though to do that way, but the most headache is deployment
17:06
@Abhi nope, I have travelled like 40 hours in the past 45
I dozed-off
17:19
@forresthopkinsa I had to add some scaffolding for webstorm in the package.json scripts:
"command": "babel-node $NODE_DEBUG_OPTION bin/compile"
... and update to webstorm 2018.2.1, 2018.1 had a bug
ah.
and you're able to step through the script now?
yeah, without browser
pretty rad
that's very nice
love jetbrains stuff
I am very happy indeed
:)
user1596138
Why doesn't form.reset fire onChange of interior inputs
user1596138
17:25
They change lol
user1596138
They also have no individual reset events
user1596138
So I guess I will not go down this XY path
@oboecat ping
... gods. all my thing is failling because at some point, somewhere, a single whitespace is added between two letters in a path variable
I have no idea how to start about that
path.split(' ').join('');
:D
17:38
hahaha
yeah, I'll try not to have to fork webpack and add that for my app ;)
... that being said, stepping through webpack is possibly the most instructive things I've done this week
17:50
const obj = { first: 'Jane', last: 'Doe' };
const {first: f, last: l} = obj; // 1)
const {first, last} = obj; // 2)
@Eduardo 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.
whats the difference on second and third line?
between*
const { foo: NEWNAME } = { foo: 1 };
console.log(NEWNAME); // 1
you can rename properties you're destructuring out of an object
that's how
so line 2 results in variables 'first' and 'last'
line 3 results in variables 'f' and 'l'
err, reverse those lines
ok... How do you send a react static site on the same server with your api or is it impossible? using express
put api on different port?
17:56
serve the html file with express
you don't need a different port
app.use(apiRouter);
app.use( (req, res, next) => {
	res.sendFile('index.html', {
		root: 'lib/static',
		headers: {
			'Content-Type': 'text/html'
		}
	}, error => {
		if( error ) {
			next( error )
		}
	})
});
// error handling next
// catch all next
app.listen(port);
Got it, thank you @rlemon
yeah, however if i refresh on say localhost:8081/account then I get {"error":{"message": "Not Found"}}
look at the flow I have
if the endpoint isn't in the apiRouter
app.use catches all
if there is an error there I next it then look for other crap in my error handling
ok, let me try that.. thanks I'll let you know. thank you
that's exactly how a few of my react projects are structured from a server standpoint
works out pretty well
18:00
what, I'm not using server side routing
*rendering
yea, this doesn't do that either.
what is apiRouter
your api
you need a router for that
unless you're doing websockets or something
the client doesn't see those routes, it's for your react app to communicate with.
oh got it, you are placing it after all other routes
placing it before all others
18:02
the routes or the client build?
the client build is in my assets folder after webpack
it's just some JS files
Can someone further explain why it is convention to prefix properties with '$'? Does the '$' signify that it is a public property?
hmmm.. now I'm getting main.6a1cb097.js:1 Uncaught SyntaxError: Unexpected token <
very very basic example
so if the client goes to server.com/api/users they will get the json result. if they go to anything that isn't defined in the router, they get served your index.html
there are packages to line up the server and client routes, I just don't bother.
@rlemon yeah... I'm definitely not trying to do that. I just want to server my client on a refresh in every route..
18:10
yea the example I showed you does that
or should, I obviously just slapped that out there
Do you have an idea why it's telling me Unexpected token <
probably because it's trying to eval HTML as js
!!> JSON.parse("<html></html>")
@rlemon "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data"
well, in chrome the messages is the same :P
figured it out.
I needed
app.use(express.static(`${__dirname}/../build`));
I don't even know what that really does... I hate being that guy.. "It just works"
18:14
Ohh shit I spaced on that.
That tells express to serve static files in those dirs. Nothing is automatic
@rlemon It's good that way and I assumed that
I think the biggest barrier in the node community that doesn't always exist in every community is that there is a lot of code posted in tutorials and stuff that is just like "Just add this: " followed by some code that resembles brainfuck to the uninitiated.
The bigger issue is how quickly things change
Thank you though. The tutorial I was following was really basic and I think it assumed you weren't using an api.
Especially in the early days
A two year old blog post can be completely wrong
@rlemon I bet. I'm newer to it, but I like it way better than php
@rlemon and maybe that's why a lot of stuff doesn't even try to explain. Could be quick updates to just make it work or whatever.
18:17
I don't trust information about nodejs usually if it is more than a year old.
@ShrekOverflow Happy birthday! :D
@rlemon thank's for the tip.
take it with a grain of salt.
Is having cors enabled when not needed a horrible thing to do out of laziness?
18:32
just means other can use your resources
client side or sever side or both? I'm more referring to building my client with cors mode enabled in fetch requests to save my testing environment.
server sides doesn't gaf about cors
cors is specifically client
well, I'm sure some servers do
but usually that's a non issue
I thought it did:
app.use(cors());
you need cors headers on the server to be sent
I'm using a cors module for some reason lol
18:35
that provides those when resources are requested
but server -> server, they other server usually isn't limited by cors
oh got it
it's probably due to stripe
one common way to get around cors limitations is to proxy the resources from your own server

« first day (2861 days earlier)      last day (2312 days later) »