These are chat archives for FreeCodeCamp/HelpJavaScript

26th
Nov 2018
Brad
@bradtaniguchi
Nov 26 2018 00:11
@Pagnito no, its a service, not a server you can do that in.
@Pagnito Any auto-complete package should do that
laiyiwan
@laiyiwan
Nov 26 2018 10:26
image.png
Jefferson
@jeffersonnnn
Nov 26 2018 11:57
hi guys.
Jefferson
@jeffersonnnn
Nov 26 2018 12:14
so has anyone tried building a Node API without postgres/MongoDB or anyother persisting platform or is this unique to me? I am in a bootcamp-esque program right now and we are tasked with building an API with node/express and a 'data structure' for persisting the data. How is this even possible?
Probably good to clarify the exercise and ask if you can use a DB or not too. Otherwise just use node to write to a file and make your own data structures
Jefferson
@jeffersonnnn
Nov 26 2018 14:14
@NJM8 i found that we can't use data structures for any reason at all; but that article looks amazing. Infact, i will use it right away. Thank you very much for it!
Jason Luboff
@JLuboff
Nov 26 2018 16:15
Morning :wave:
Christopher McCormack
@cmccormack
Nov 26 2018 16:20
heya @JLuboff morning
How was your holiday?
Jason Luboff
@JLuboff
Nov 26 2018 16:21
@cmccormack Hectic.. yours?
Christopher McCormack
@cmccormack
Nov 26 2018 16:21
Same but enjoyable
Spent most of the week cleaning, prepping, and cooking, finally got a break on Saturday haha
Jason Luboff
@JLuboff
Nov 26 2018 16:22
Sounds like my week as well hah
Just throw in a sick kid :(
Christopher McCormack
@cmccormack
Nov 26 2018 16:22
did you host?
Jason Luboff
@JLuboff
Nov 26 2018 16:22
Ya we did
Christopher McCormack
@cmccormack
Nov 26 2018 16:22
awesome
sorry about your kid though
Jason Luboff
@JLuboff
Nov 26 2018 16:22
Easier with the kiddo, plus celebrated his birthday same day
Christopher McCormack
@cmccormack
Nov 26 2018 16:24
well that's cool man, glad you enjoyed it at least.
Jason Luboff
@JLuboff
Nov 26 2018 16:24
Ya... made the best of it
Christopher McCormack
@cmccormack
Nov 26 2018 16:24
Back to the grind today?
Jason Luboff
@JLuboff
Nov 26 2018 16:24
Yup
Catching up right now
Christopher McCormack
@cmccormack
Nov 26 2018 16:25
I was worried I would be swamped with emails but because of our network freeze it was a light load, looking forward to the rest of the year :)
Jason Luboff
@JLuboff
Nov 26 2018 16:26
I still have 20 to go through lol
@cmccormack So are you officially on your month off, or another week?
Christopher McCormack
@cmccormack
Nov 26 2018 16:28
I don't get a full month off this year because of my wedding that extended into January, but I'll get about half of December off
But even when I do have to work it will be quiet
Jason Luboff
@JLuboff
Nov 26 2018 16:29
Ah.. thats not bad than
Christopher McCormack
@cmccormack
Nov 26 2018 16:30
no not at all, time to let the stress fall off and relax until January :)
what about you, when can you escape the office for the year?
Jason Luboff
@JLuboff
Nov 26 2018 16:34
Eh..I had taken all of last week off and thats it for the rest of the year
Besides the regular holidays
Christopher McCormack
@cmccormack
Nov 26 2018 16:35
oh that stinks
hopefully you won't have too much work to do though
Jason Luboff
@JLuboff
Nov 26 2018 16:51
I'll be working on projects mainly..so I'll stay busy but hopefully not with stuff I don't want to be busy with lol
Aditya
@ezioda004
Nov 26 2018 16:56
:wave: fellas
Jason Luboff
@JLuboff
Nov 26 2018 16:57
Yo
What up
Christopher McCormack
@cmccormack
Nov 26 2018 16:57
@ezioda004 heya
Aditya
@ezioda004
Nov 26 2018 16:57
@JLuboff Job hunting - going well so far :D
What about you?
@cmccormack Hey, hows it going?
Christopher McCormack
@cmccormack
Nov 26 2018 16:58
@ezioda004 going well? that's awesome! Lots of offers?
@ezioda004 you use VS Code?
Jason Luboff
@JLuboff
Nov 26 2018 16:59
@ezioda004 Just catching up on things after being out last week
Glad to hear the job hunting is going well!
Aditya
@ezioda004
Nov 26 2018 16:59
@cmccormack Only applied to handful (end sems in a week, will apply afterwards), got more calls than expected. Another interview tomorrow
@cmccormack Yes, VSC for life
Christopher McCormack
@cmccormack
Nov 26 2018 17:00
@ezioda004 https://medium.freecodecamp.org/immensely-upgrade-your-development-environment-with-these-visual-studio-code-extensions-9cd790478530 pretty good list of extensions. You probably have several of them but I thought a couple were pretty cool I didn't have
Aditya
@ezioda004
Nov 26 2018 17:00
@JLuboff Thanks, I think adding fcc certs was a good idea!
Jason Luboff
@JLuboff
Nov 26 2018 17:01
Great! Always exciting to hear
Perhaps it holds more weight than I thought hehe
Aditya
@ezioda004
Nov 26 2018 17:01
@cmccormack Awesome list, but if I install any more extension - my laptop will just die
Currently it takes more than 1.5 gigs
Christopher McCormack
@cmccormack
Nov 26 2018 17:01
@ezioda004 hah yeah on my laptop I limit the number as well
I'm currently churning just looking at the FCC repo without extensions due to the git integration stuff constantly checking
Aditya
@ezioda004
Nov 26 2018 17:02
High contrast of material theme is my fav theme
Christopher McCormack
@cmccormack
Nov 26 2018 17:02
I like Cobalt2 or Shades of Purple
I love the contrast and colors on both
Aditya
@ezioda004
Nov 26 2018 17:03
Oo, gonna check shades of purple
Christopher McCormack
@cmccormack
Nov 26 2018 17:03
I really want a green version of it but haven't found one yet
Jason Luboff
@JLuboff
Nov 26 2018 17:03
Ah... nothing like getting an email "Application glitch" and its just user error.. sigh
Christopher McCormack
@cmccormack
Nov 26 2018 17:03
nah it's a glitch
Jason Luboff
@JLuboff
Nov 26 2018 17:04
It really irks me when I get one of those emails (in regards to my applications). Glitch. Just grinds my gears for some reason
Aditya
@ezioda004
Nov 26 2018 17:04
I'm digging shades of purple
Christopher McCormack
@cmccormack
Nov 26 2018 17:05
yeah I didn't think I would care much for a purple theme but I love it
Aditya
@ezioda004
Nov 26 2018 17:06
Yeah, I like monokai too
Its a classic
Christopher McCormack
@cmccormack
Nov 26 2018 17:08
themes are weird, I have no idea what I like but I know what I like when I see it
Aditya
@ezioda004
Nov 26 2018 17:08
Hah yeah
Christopher McCormack
@cmccormack
Nov 26 2018 17:08
I may build my own green theme out of cobalt2/shades of purple just to try and understand
Aditya
@ezioda004
Nov 26 2018 17:09
I could use a matrix theme
Jason Luboff
@JLuboff
Nov 26 2018 17:09
My current theme is Neutron...but.. I'm a little tired of it :)
Aditya
@ezioda004
Nov 26 2018 17:10
Hmm is that not in VSC? cant find it
Christopher McCormack
@cmccormack
Nov 26 2018 17:11
He uses Atom
Aditya
@ezioda004
Nov 26 2018 17:11
Mr Fancy Pants
Christopher McCormack
@cmccormack
Nov 26 2018 17:11
I feel I need to make a new extension called Neutron just because there are 0 search results for that word haha
Aditya
@ezioda004
Nov 26 2018 17:12
Lol, its not a bad idea - you could publish your own theme with that name
Christopher McCormack
@cmccormack
Nov 26 2018 17:12
yeah!
and it will be green!
Jason Luboff
@JLuboff
Nov 26 2018 17:12
How often do you guys change your themes? I think I change it every few months
Christopher McCormack
@cmccormack
Nov 26 2018 17:13
not unlike an actual Neutron, I assume
@JLuboff rarely when I find one I really like
Aditya
@ezioda004
Nov 26 2018 17:14
I dont think neutrons can be seen (I could be wrong)
I change theme based on mood, having 1 theme feels monotonic
Jason Luboff
@JLuboff
Nov 26 2018 17:15
I just get bored of the same theme after a while
Christopher McCormack
@cmccormack
Nov 26 2018 17:16
@ezioda004 was a joke haha
Aditya
@ezioda004
Nov 26 2018 17:16
Same, new theme is refreshing
@cmccormack I'm dense..like a nucleus (enter ba dum tss gif)
Christopher McCormack
@cmccormack
Nov 26 2018 17:16
I tend to jump between several different tools throughout the day so my themes are always different, Hyper Terminal, VS Code, Sublime Text
Aditya
@ezioda004
Nov 26 2018 17:17
You use oh my zsh on hyper?
Christopher McCormack
@cmccormack
Nov 26 2018 17:17
yeah
This weekend I started playing around with Vim themeing as well
but I found that more difficult than I expected, colors aren't what I would expect because the editor overrides or whatever
Aditya
@ezioda004
Nov 26 2018 17:21
Is it true using vim makes you a l33t h4ck3r?
Christopher McCormack
@cmccormack
Nov 26 2018 17:21
Vim is pretty badass, it already comes with tons of syntax files
Yes
haha
Aditya
@ezioda004
Nov 26 2018 17:21
My experience with vim
Christopher McCormack
@cmccormack
Nov 26 2018 17:22
haha
Jason Luboff
@JLuboff
Nov 26 2018 17:22
:joy:
Christopher McCormack
@cmccormack
Nov 26 2018 17:22
I have used VI/VIM for like 20 years now but I barely actually use it, so It's like learning something new EVERY TIME
Jason Luboff
@JLuboff
Nov 26 2018 17:23
I've used them sparringly
Christopher McCormack
@cmccormack
Nov 26 2018 17:23
I can get in, edit with basic commands, and quit, but that's mostly it
Aditya
@ezioda004
Nov 26 2018 17:23
Then you know more vim than 90% of devs out there
Christopher McCormack
@cmccormack
Nov 26 2018 17:24
I started on this yesterday if you're interested https://gist.github.com/cmccormack/7dd38e8219e8876c03d63f42dba5db4f
Aditya
@ezioda004
Nov 26 2018 17:29
Gonna try that sometime, thanks!
Christopher McCormack
@cmccormack
Nov 26 2018 17:31
np setting it up was really easy
then I added VIM-Plug as well for plugins, seems easy as well but haven't added to guide yet
Jason Luboff
@JLuboff
Nov 26 2018 17:35
So whats everyone working on today?
Christopher McCormack
@cmccormack
Nov 26 2018 17:36
Network diagrams! Eating my frogs before the fun stuff
Jason Luboff
@JLuboff
Nov 26 2018 17:37
I've never tried frog...how is it/
Aditya
@ezioda004
Nov 26 2018 17:37
@JLuboff I was asked to make a github kinda clone with React, Redux and vanilla CSS in a day for a job. This is what I made: https://github-profile-viewer.netlify.com/
Christopher McCormack
@cmccormack
Nov 26 2018 17:38
Frog I've had is good, do you have Pappadeaux out there?
@ezioda004 oh man I like that, so easy on the eyes
@ezioda004 are you using a router?
Aditya
@ezioda004
Nov 26 2018 17:39
@cmccormack Never had frogs, and thanks! I tried to keep it simple
Yeah, used react router too
Christopher McCormack
@cmccormack
Nov 26 2018 17:40
you may need to update the path when you receive the results
Aditya
@ezioda004
Nov 26 2018 17:40
Like /profile/username?
Christopher McCormack
@cmccormack
Nov 26 2018 17:40
yeah
exactly
so it will automatically query that user instead of taking me back to search
Aditya
@ezioda004
Nov 26 2018 17:40
I got lazy :D but thats doable
Christopher McCormack
@cmccormack
Nov 26 2018 17:41
looks great though
repo search is really fast
@ezioda004 did you make the CSS yourself? nice job with .input-field:focus
Karma Drukpa
@coderkarma
Nov 26 2018 17:44
yeah search is fast. i like that.
Jason Luboff
@JLuboff
Nov 26 2018 17:44
@ezioda004 Damn, you made that in a day?
@cmccormack Pappadeaux?
Christopher McCormack
@cmccormack
Nov 26 2018 17:46
Restaurant, I know they have frog and alligator and stuff
Jason Luboff
@JLuboff
Nov 26 2018 17:46
Oh...no not that I'm aware of
Aditya
@ezioda004
Nov 26 2018 17:50
@cmccormack Yeah only basic CSS, JS took 1/4 time, CSS took 3/4 :D
@JLuboff Yeah, I wasnt sure I was going to able to pull it off but it worked
Christopher McCormack
@cmccormack
Nov 26 2018 17:51
@ezioda004 haha yeah once you're familiar with React it's pretty quick to write the JS but it's gotta look good!
Jason Luboff
@JLuboff
Nov 26 2018 17:51
Very impressive... I always feel slow in my development.. especially when I see things like this lol
Christopher McCormack
@cmccormack
Nov 26 2018 17:51
@ezioda004 you like Netlify? I only ever played with it with Gatsby but it seems pretty cool
Aditya
@ezioda004
Nov 26 2018 17:54
@cmccormack True! I like netlify, very quick to host frontend projects - with github integration the build is automatic as soon as you push the code to the repo so very convenient
@JLuboff Thanks, I'm pretty sure if I was given a week I'd still have done it but slowly :D
Christopher McCormack
@cmccormack
Nov 26 2018 17:55
@ezioda004 your site seemed to load faster than Heroku that's for sure
Aditya
@ezioda004
Nov 26 2018 17:56
I've found netlify to be faster than glitch and heroku
But you cant host backend stuff on it sadly
Christopher McCormack
@cmccormack
Nov 26 2018 18:22
@ezioda004 so did you have to host your React bundle on your github?
Aditya
@ezioda004
Nov 26 2018 18:27
@cmccormack React bundle? You mean the build? Nah, netlify automatically does the build. Heres the link to the repo
Christopher McCormack
@cmccormack
Nov 26 2018 18:29
It runs the build script by default? Or do you have to tell it which to run?
or is it running start (I don't remember what CRA start does)
Aditya
@ezioda004
Nov 26 2018 18:30
It runs npm run build when you push the repo the to the master and deploys the build from /build folder
Christopher McCormack
@cmccormack
Nov 26 2018 18:30
oh lol it's right there on their front page
Aditya
@ezioda004
Nov 26 2018 18:31
Yes :D
Christopher McCormack
@cmccormack
Nov 26 2018 18:31
cool I'll have to play with that
looks like their CLI makes it even easier
Brad
@bradtaniguchi
Nov 26 2018 18:40
Ah, back to the grind :D
Jason Luboff
@JLuboff
Nov 26 2018 18:40
@bradtaniguchi Too you long enough
Brad
@bradtaniguchi
Nov 26 2018 18:42
What? should I work on thanksgiving from now on :P
Jason Luboff
@JLuboff
Nov 26 2018 18:42
Yes. :P
Jason Luboff
@JLuboff
Nov 26 2018 18:47
oh man...just went through and actually commented all my files...
Brad
@bradtaniguchi
Nov 26 2018 18:56
@JLuboff Do you understand everything now :P
Pagnito
@Pagnito
Nov 26 2018 19:04
can we store files in a sql database?
or do most companies store files in a FS on the server?
Brad
@bradtaniguchi
Nov 26 2018 19:09
@Pagnito Id say it depends on the files. If were talking "large" files id use a specific DB type to store the file information. if its like plain-text files you could get away with an sql database, but then even then Id consider a blob storage or something specific
Pagnito
@Pagnito
Nov 26 2018 19:10
im having a hard time understanding what a blob is
why does it say binary
Jason Luboff
@JLuboff
Nov 26 2018 19:13
@Pagnito Unless the files are under 1 MB, than do not store them in the database. Even then, I would advise against it. It will create a lot more overhead than needed.
Instead, store the file on a file server and create symbolic link in your databsae
Pagnito
@Pagnito
Nov 26 2018 19:14
so if they are over 1mb where do we store them
ah
Jason Luboff
@JLuboff
Nov 26 2018 19:14
@bradtaniguchi ...I sure hope I do.. :P
Pagnito
@Pagnito
Nov 26 2018 19:14
whats a symbolic link?
Jason Luboff
@JLuboff
Nov 26 2018 19:15
Meaning the file path to the file on the file server for example
\\myFileServer\myFolder\myFile.ext
You would store that in the database
Pagnito
@Pagnito
Nov 26 2018 19:16
ah
im reading here, that turning a image into a blob causes some quality loss. When is it a good case to use blobs?
Jason Luboff
@JLuboff
Nov 26 2018 19:17
That I'm not sure.
Pagnito
@Pagnito
Nov 26 2018 19:17
also, if i have to send a big image, do i send it via formData?
Jason Luboff
@JLuboff
Nov 26 2018 19:18
Send from the frontend to the backend?
Pagnito
@Pagnito
Nov 26 2018 19:18
ya
Jason Luboff
@JLuboff
Nov 26 2018 19:19
Than ya, formData is a good choice
Pagnito
@Pagnito
Nov 26 2018 19:20
k thn
thnx*
Aditya
@ezioda004
Nov 26 2018 19:41

@cmccormack Do you have a good way to detect if the current page URL isnt the same as to what you're already redirecting to? I came up with this:

{this.props.location.pathname !== "/" &&
          this.state.profileFound &&
          this.props.location.pathname.split("/").slice(-1)[0] !==
            this.state.username ? (
            <Redirect push to={`/profile/${this.state.username}`} />
          ) : null}

But its ugly and hacky

Christopher McCormack
@cmccormack
Nov 26 2018 19:43
@ezioda004 what's the scenario?
Aditya
@ezioda004
Nov 26 2018 19:44
So my App component is rendering <Route> and the App rerenders few times due to setState, so with simple redirect - I get warning in console (trying to redirect to same page)
Christopher McCormack
@cmccormack
Nov 26 2018 19:46
Do you have to use a redirect? I only ever use those in the event a user is trying to go directly to a page that they aren't allowed to access
Aditya
@ezioda004
Nov 26 2018 19:47
Hmm, how do I make the user go to some URL after my fetch is completed?
I only found 1 way and that was using <Redirect >
fetch().then({
  //data fetched
  this.setState({
    fetchCompleted: true
  })
})

render(){
  return (
    this.state.fetchCompleted ? <Redirect /> : <RenderSomethingElse />
  )
}
Christopher McCormack
@cmccormack
Nov 26 2018 19:52
I used this in my Context:
  componentDidUpdate() {
    const { query, } = this.state
    history.pushState({}, null, `/?${queryString.stringify(query)}`)
  }
I used a query string to update the URL with the location (nightlife app) so if you reloaded the page or went forward then back or whatever it would load that location
hard to remember how it all works though lol
Aditya
@ezioda004
Nov 26 2018 19:54
That different tho, right?
Christopher McCormack
@cmccormack
Nov 26 2018 19:54
depends on how your page is rendered I guess
Aditya
@ezioda004
Nov 26 2018 19:54
My problem is I need to change the URL based on fetch() result
I could only find a solution using Redirect component, any other alternative?
Christopher McCormack
@cmccormack
Nov 26 2018 19:55
that's what mine does, updates state with the query string which includes location, then what is rendered is determined by that query (I think)
Aditya
@ezioda004
Nov 26 2018 19:56
Oh so your route depends on the location?
Christopher McCormack
@cmccormack
Nov 26 2018 19:57
it's true it's slightly different as I'm using a query but I think you could do something similar with the whole path, especially if state is in the same component as your routes
Aditya
@ezioda004
Nov 26 2018 19:57
No Route component in that page :(
Christopher McCormack
@cmccormack
Nov 26 2018 19:57
what renders the users info?
oh wait I can see your code one sec
Aditya
@ezioda004
Nov 26 2018 19:58
<Profile>
Thats rendered by <Route>
I'll push by hacky solution
Christopher McCormack
@cmccormack
Nov 26 2018 20:00
Can you not just push the username to the /profile route Profile component as props and use componentDidUpdate like I did to update the path?
Aditya
@ezioda004
Nov 26 2018 20:01
history.pushState({}, null, `/?${queryString.stringify(query)}`) this will update the URL?
Christopher McCormack
@cmccormack
Nov 26 2018 20:01
or maybe something like /profile/:username to render it
it does for mine
Aditya
@ezioda004
Nov 26 2018 20:02
Havent used the history API
Ohh, that makes it easier
I'll read about that and then try to implement
Christopher McCormack
@cmccormack
Nov 26 2018 20:03
shouldn't be too bad I don't think
although there are always quirks when messing with the history api I've noticed
Aditya
@ezioda004
Nov 26 2018 20:04
Isnt that what React Router uses under the hood?
Christopher McCormack
@cmccormack
Nov 26 2018 20:04
yeah
the whole router isn't even all that complicated, I would read the source code when you get the chance
Aditya
@ezioda004
Nov 26 2018 20:06
Yeah its alright, I like it cause its more declarative..history API is imperative and therefore becomes ugly with React syntax
But that aint uglier than my code :sob:
Christopher McCormack
@cmccormack
Nov 26 2018 20:09
@ezioda004 that's why I don't use Redirect, feels too imperative
Aditya
@ezioda004
Nov 26 2018 20:09
Would you rather use window.location ? :D
Christopher McCormack
@cmccormack
Nov 26 2018 20:10
No I just don't use it
mostly don't use it :)
I use it in one place in my app - when you logout it logs you out and redirects to /
even that could have been done without Redirect though using my PrivateRoutes
Aditya
@ezioda004
Nov 26 2018 20:15
Interesting, the best use of redirect http://www.playdiablo4.com
Christopher McCormack
@cmccormack
Nov 26 2018 20:19
lol
it wasn't diablo 4!
#notmydiablo
Adel
@AdelMahjoub
Nov 26 2018 20:20
The best is yet to come ... the next diablo is a ... mobile game ...
so. ... bye bye diablo, redirect to shovel ware
Aditya
@ezioda004
Nov 26 2018 20:21
Dont you guys have phone?
Adel
@AdelMahjoub
Nov 26 2018 20:21
render micro transaction
Christopher McCormack
@cmccormack
Nov 26 2018 20:21
The mobile gaming market lost me for good. I was pretty in to a lot of different games but their repetitive nature and constant money grabbing has turned me off, I no longer play any games on my phone. I wonder how many people have a similar mindset
If it was a turn based strategy RPG of Diablo I might be into it
Adel
@AdelMahjoub
Nov 26 2018 20:22
same, zero interest in any mobile game
actually I don't play any 'free2play' with micro transaction
I prefer to pay indie developers than play trash f2p games from big companies
Christopher McCormack
@cmccormack
Nov 26 2018 20:26
problem for me is the stores are also shit so I could never find anything that was both interesting and not a cash grab
Aditya
@ezioda004
Nov 26 2018 20:26
They literally said Diablo immortal is developed for China since those people pay a lot for micro transactions
Christopher McCormack
@cmccormack
Nov 26 2018 20:27
well yeah, a country of a billion people has a lot more whales to prop up their profits I'm sure
Aditya
@ezioda004
Nov 26 2018 20:28

notMyBlizzard

But I'm sure I'll play W3 reforged when it comes out
Pagnito
@Pagnito
Nov 26 2018 20:29
if i put a expiry date on a cookie that is in the past, would that make the cookie unexpirable
Adel
@AdelMahjoub
Nov 26 2018 20:30
that will make the cookie expire
Pagnito
@Pagnito
Nov 26 2018 20:30
i dunno it doesnt seem to expire for me right now
Adel
@AdelMahjoub
Nov 26 2018 20:31
try login and refresh the page
Pagnito
@Pagnito
Nov 26 2018 20:31
i did
i closed tab and revisit
and im still logged in
Adel
@AdelMahjoub
Nov 26 2018 20:32
need to take a look at the code I guess
Pagnito
@Pagnito
Nov 26 2018 20:32
i was tryin to set this as an expiy date
new Date(2030, 11, 24, 10, 33, 30, 0)
but it set it as 1969
when i log the date object it shows 2030
but in the cookie it gets set as 1969
Adel
@AdelMahjoub
Nov 26 2018 20:33
take a screenshot of the cookie in the network tab, site data, from your dev tools
Pagnito
@Pagnito
Nov 26 2018 20:35
Screen Shot 2018-11-26 at 3.34.44 PM.png
Screen Shot 2018-11-26 at 3.35.19 PM.png
Adel
@AdelMahjoub
Nov 26 2018 20:36
are you sure you are still logged in ? or just the cookie is being refreshed ?
Pagnito
@Pagnito
Nov 26 2018 20:39
well doesnt the cookie only get set during the login process?
Adel
@AdelMahjoub
Nov 26 2018 20:39
it depends
it can be set on every refresh or each data change or any
Pagnito
@Pagnito
Nov 26 2018 20:41
well i figured out why its settin the cookie wrong, i dont wanna depend on the whole past thing anyways
Adel
@AdelMahjoub
Nov 26 2018 20:47
there was a time, cookies were set when someone write thanks
Pagnito
@Pagnito
Nov 26 2018 20:48
what?
what do u mean?
Adel
@AdelMahjoub
Nov 26 2018 20:50
camperbot
it is no longer here
used to give cookies to users
Pagnito
@Pagnito
Nov 26 2018 20:51
oooh
yea i remember that
Adel
@AdelMahjoub
Nov 26 2018 20:51
it was a joke attempt, but well, fail
Pagnito
@Pagnito
Nov 26 2018 20:52
no i got that haha
i just wasnt sure
thats why i was a bit confused
Brad
@bradtaniguchi
Nov 26 2018 21:15
Gotta add a new feature that does all this nice stuff to a database.... can't connect to the database tho, so.....
Adel
@AdelMahjoub
Nov 26 2018 21:16
@bradtaniguchi why can't connect to the database ?
Brad
@bradtaniguchi
Nov 26 2018 21:17
@AdelMahjoub Some issue with the settings haha, not my responsibility/knowledge tho. So I can't do what I gotta do haha
Adel
@AdelMahjoub
Nov 26 2018 21:17
@bradtaniguchi ah, I see, I like when it is not my responsability
Brad
@bradtaniguchi
Nov 26 2018 21:18
Yea me too, kinda sorta. But ATM I'm dead in the water...
Jason Luboff
@JLuboff
Nov 26 2018 21:27
@bradtaniguchi What type of database?
Adel
@AdelMahjoub
Nov 26 2018 21:29
I guess it is a json file but don't have write permission ?
or an sqlite db folder but don't have read/write permission ...
like please contact our support center for ssh access
Jason Luboff
@JLuboff
Nov 26 2018 21:31
Ew sqlite
Adel
@AdelMahjoub
Nov 26 2018 21:33
There is a very well known service here in France, that don't have registration and payment in their page
So you need to contact, take a rdv, and then they open an account for you
it is not a bank
Jason Luboff
@JLuboff
Nov 26 2018 21:35
Thats odd
Adel
@AdelMahjoub
Nov 26 2018 21:35
yeah, they were stuck in mid 90s
I guess they did not updated their services for at least 20years
But a really heavy trafic site
I proposed my services, to ... help them improve their services tho
but nah, they don't want to think more about it
like , it works perfectly, and there is human contact
when all the others have all what you expect such services to have
the minimum fee is 380€ / month for 20 announces ?
and a crap service
humans, validate images and announces
Jason Luboff
@JLuboff
Nov 26 2018 21:39
Maybe you should convince them to hire you to make a new system ;)
Adel
@AdelMahjoub
Nov 26 2018 21:40
I only met some commercials, hard to convince them
but the worst, they don't provide any web api to manage your announces
Brad
@bradtaniguchi
Nov 26 2018 21:42
@JLuboff Mongo, right now I'm connecting to a database (within the mongo-db)
Adel
@AdelMahjoub
Nov 26 2018 21:42
you need to get another subscription with another company software ...
Brad
@bradtaniguchi
Nov 26 2018 21:42
Sorry I thought I responded earlier by didnt hit send hehe
Adel
@AdelMahjoub
Nov 26 2018 21:42
so it is 380€ + 120€ for the software
Jason Luboff
@JLuboff
Nov 26 2018 21:43
@bradtaniguchi Oh.. so username/password issue?
Adel
@AdelMahjoub
Nov 26 2018 21:43
when I proposed to build an api for their customers, it was a NO
No, they have to use our PartNeRs software !
geez !
Jason Luboff
@JLuboff
Nov 26 2018 21:44
Forget em then!
Adel
@AdelMahjoub
Nov 26 2018 21:44
yeah,
Brad
@bradtaniguchi
Nov 26 2018 21:44
It's something about the permissions on the user itself, I can connect to the DB so I have the right creds, but it says the user "doesn't have permissions to perform X" on the database, even tho I'm just doing a search
Jason Luboff
@JLuboff
Nov 26 2018 21:45
@bradtaniguchi Ohh... the user isn't an admin
Brad
@bradtaniguchi
Nov 26 2018 21:45
But they should be, and I have no idea how it's working right now with the original backend. (if it's still working that is...)
Jason Luboff
@JLuboff
Nov 26 2018 21:46
I blame society!
Brad
@bradtaniguchi
Nov 26 2018 21:50
I'll figure it out later, pinged the guy that's suppose to know whats up, and wait for the other guy who does too. Gotta fix some mongodb sort issues :/
Adel
@AdelMahjoub
Nov 26 2018 21:50
Someone once asked me to build a website for him, but he wanted it to be like his firend website, when I told him to give the link of his friend website, it turned out to be a facebook page ....
That reminds me of someone, so he called me and said: ''Google don't work, can you fix it', I said yeah np, it turned out he has no OS in his laptop ...
There is a real huge gap to fill,
Adel
@AdelMahjoub
Nov 26 2018 21:56
Don't be surprised if someone proposes you if you want MS word for his next app
Brad
@bradtaniguchi
Nov 26 2018 22:16
I figured out the reason why I could connect to the db but I wasn't authorized....
Jason Luboff
@JLuboff
Nov 26 2018 22:17
which is
Brad
@bradtaniguchi
Nov 26 2018 22:18
The database user authorized for the db was: db-user the database I connected to was db_user
I had db-user for both -__-
Jason Luboff
@JLuboff
Nov 26 2018 22:19
D'oh
Brad
@bradtaniguchi
Nov 26 2018 22:21
It's those kinda things that question the reasoning behind naming them that close, but not the same...
Jason Luboff
@JLuboff
Nov 26 2018 22:21
@bradtaniguchi If it makes you feel any better...I'm having to update a bunch of records due to a coding error I made...
And manually moving the files associated with said records
Brad
@bradtaniguchi
Nov 26 2018 22:22
I'd write code to fix the issues I had with the code :P
Jason Luboff
@JLuboff
Nov 26 2018 22:23
I fixed the code.. Apparently req.query.mocnumber !== req.query.mocNumber :joy:
Brad
@bradtaniguchi
Nov 26 2018 22:23
Oh yes, I've had plenty of those hehe
Jason Luboff
@JLuboff
Nov 26 2018 22:24
luckily.. it was still saving the files and they were accessible...just not where they should be
And it would take me as long or longer to code this (technically I am coding it in T-SQL)
Pagnito
@Pagnito
Nov 26 2018 23:43
hey anyone know how to properly cache for pwa in react without using create-react-app
Christopher McCormack
@cmccormack
Nov 26 2018 23:47
@Pagnito Can you use Service Workers?
Pagnito
@Pagnito
Nov 26 2018 23:47
I am
but the problem im having is that caching for regular paths is easy
but when it comes to webpack and react routing
its gotten confusing
it seems to be serving from cache as it indicates in the network tab
but when i turn off internet the cache dissappears
oh wait
i think the instructor did tell me that its very iffy with nodemon
maybe thats the problem atm
Christopher McCormack
@cmccormack
Nov 26 2018 23:51
could be, but I don't know if nodemon has anything to do with your frontend caching