• I want it to periodically send data to my server... I feel so lost... Okay, so I am running an express server on my computer localhost:3000... I cant figure out how to fetch the data off the esp8266 or like you said, have the esp8266 send the data to my server... I know it is probably so simple to do but I cant put 2 and 2 together for some reason.. I was using a third party library Axios to try to make a call to the esp but can't get that to work. .. Am I on the right path at least? Thanks

  • host: 'whatdoIputhereifIamrunningalocalserverw­ithexpress',
    

    Your esp and your server must be in the same network and can "see" each other (connecting to the same wifi router would be the easiest way to get this to happen).

    I am not familiar with express, but you have to run your server bound to an external ip. So that way the host would be something like 192.168.0.122 instead of localhost.

    In order to test if your server is connectable, it might be easier to use your phone instead of the esp. On the phone browser, if you can connect to the express server via the ip address, then that's the same address you will use on the esp.

  • You mentioned that you are doing this as part of a bootcamp. You can show this to your mentor and they would probably know how to advise you better since the server setup would within their expertise.

  • For the ones that are following along, here's the original post: http://forum.espruino.com/conversations/­353145/

    One tip though: having good discussion titles are very VERY important when asking in a forum. The one before this wasn't quite good as it doesn't immediately say what the issue was, and is likely to get ignored. This one is better, but could be improved to something like:

    esp8266 I don't know how to connect to the node js server

  • Yes very true, thank you for all your help and advice

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Node JS, express, esp8266 Accidentally closed last Post

Posted by Avatar for user117414 @user117414

Actions