Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 10 2018 02:41
    Naiba01 commented #1157
  • Sep 05 2018 18:37
    govarthananve commented #1080
  • Sep 05 2018 17:12
    carloquilala opened #1349
  • Aug 07 2018 11:42
    carloquilala edited #1348
  • Aug 07 2018 11:14
    carloquilala opened #1348
  • Jul 31 2018 06:46
    zaoansijia commented #1347
  • Jul 13 2018 01:45
    gapsaras commented #842
  • Jul 12 2018 10:08
    grootendorste commented #930
  • Jul 02 2018 15:06
    aozfen commented #1092
  • Jun 25 2018 17:25
    olliecaine27 closed #1268
  • Jun 03 2018 17:30
    olliecaine27 synchronize #1268
  • Jun 03 2018 17:16
    olliecaine27 synchronize #1268
  • May 22 2018 05:14
    ishan123456789 commented #1220
  • May 19 2018 08:38
    MirShi opened #1347
  • May 14 2018 19:53
    samanthi22 closed #1346
  • May 14 2018 19:53
    samanthi22 commented #1346
  • May 05 2018 17:33
    samanthi22 opened #1346
  • Apr 22 2018 09:28
    m-ketan closed #1319
  • Apr 20 2018 00:40
    matthew-dean commented #658
  • Apr 02 2018 12:36
    AndrewSavetchuk commented #1080
aditya shanker tagirisa
@adityashankert
😀 can you put in updated code so that it will be helpful for me next time
aditya shanker tagirisa
@adityashankert

urgent help req

i have changed the config/environments.js file dev config as follows

 development : (config) => ({
    compiler_public_path : `http://${config.server_host}:${config.server_port}/`,
    globals: {
      ...config.globals,
      API_URL: JSON.stringify('<your-api-url-here>')
    }
  })
im getting following error
 ...config.globals,
      ^^^
SyntaxError: Unexpected token ...
my aim is to add global variables to my app please help me with this
have to deploy asap :worried:
Mike DeVita
@mikedevita
anyone have an example of using redux-cli with blueprints for route generation?
David Zukowski
@davezuko
@adityashankert looks like your Node version does not support the spread operator. Try:
globals: Object.assign({}, config.globals, { API_URL: JSON.stringify('<your-api-url-here>') })
aditya shanker tagirisa
@adityashankert
@davezuko thanks :)
Mike DeVita
@mikedevita
Anyone used sockets with redux?
joshuaandrewhoffman
@joshuaandrewhoffman
@mikedevita I am, how can I help?
Mike DeVita
@mikedevita
Anyone using jest instead of mocha Chai enzyme?
Mike DeVita
@mikedevita
Does WL still load a count query into memory and do an [].length lol?
Saw a thread on Reddit about that but it was for v0.9
WRoot chat lol
joshuaandrewhoffman
@joshuaandrewhoffman
Lol... What were you wondering about the socket stuff @mikedevita ? This is an area I've spent a lot of time struggling with and learning. Would love to pay you back for your help the other day
Mike DeVita
@mikedevita
@joshuaandrewhoffman ive got it working i think
working on something else and cant switch back
joshuaandrewhoffman
@joshuaandrewhoffman
Right on. Glad you got it going. Lmk if you snag on anything else or just wanna talk shop spot about redux with sockets
-spot
Mike DeVita
@mikedevita
ok sure
joshuaandrewhoffman
@joshuaandrewhoffman
RIP phones w/ keyboards D:
Mike DeVita
@mikedevita
yeah i hear ya on that one lol
Jason Shin
@JasonShin
davezuko/react-redux-starter-kit#1078
Hi, I have created an issue.
Please have a look, thanks.
Jason Shin
@JasonShin
Wow, Webpack is bugging me so much
Every 5 min, Webstorm freezes
Any recommendation guys?
Mike DeVita
@mikedevita
@joshuaandrewhoffman how did you handle socket updates from other emits like another user updating something or emitting something
I'd assume like if I had an items store in redux when it's updated no matter where or what page I'm at I want it to update
Mike DeVita
@mikedevita
With all connected clients like ... socket.on(item-update... update the items store with the changed item with id..
joshuaandrewhoffman
@joshuaandrewhoffman
So this is where this type of development gets really interesting to me. I'm not convinced there's aa single right way for every app to do this. In my case the sockets are often emitting actions which apply to at most two users: the user who initially sent the action to the server, and the user in the same game room.
So what I did was sort of scope down my concept of state on the server to those rooms and who was in them, and just emit to that. I had trouble getting socket.io's native rooms feature to emit to the calling user, and I had trouble with the automatically created room for the socket ID, so if you figure out the incantation for that please lmk
Mike DeVita
@mikedevita
okay
let me give you some background
im building a realtime infrastructure app
joshuaandrewhoffman
@joshuaandrewhoffman
I ended up just rolling my own room tracking since it wasn't terribly complex and I didn't want to be stuck
Mike DeVita
@mikedevita
to manage 300+ virtual machines, with agents on each system that report things like cpu/disk/memory usage and offer an entry point to shutdown/start services in an order on each VM.. for example shut down production ECC instance, which will first shut down the app servers, then the load balancer, then the database.
and i also want to provide realtime updates for things like changes to server info by a user/team member..
right now its not realtime, you have to refresh to see the changes.. the concept is if user a is on the site, user b changes a server i want user a to get notified of the change and see the changes.
i have the agent stuff down, using sailsjs for the backend and socket.io for the connections that works fine.
im just not sure how/where to put the socket.in('server-update, function() .... code at. should it go in a reducer/store file and just dispatch a thunk action like SERVER_UPDATED
joshuaandrewhoffman
@joshuaandrewhoffman
I probably should've checked first, are we pure socket-io here or using socket-io-redux? (Unsure I have that package name right I don't have my code in front of me)
Mike DeVita
@mikedevita
well its sails-io-js which is a wrapper around socket.io
pure socket.io on the client side for now i'd say
but im open to a library like socket-io-redux
joshuaandrewhoffman
@joshuaandrewhoffman
And I'm assuming either way you're doing redux or something redux-like on your server to track your state
Mike DeVita
@mikedevita
yup
this is the codebase