Jump to content

disease

Members
  • Posts

    5
  • Joined

  • Last visited

disease's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I don’t think I’ve clearly explained what I’m asking, my webserver using node is running as a http server which from what I guess will only serve specific files you direct it to read etc. I have multiple files inside the public folder I need to serve but primarily two images, the HTML file for the server is located in the same directory as these images but can’t seem to serve them so that the HTML can access the contents.
  2. Have tried this, unfortunately the http is preventing this from happening it seems it’s not creating a local host it’s just serving the specific HTML file. My Code is here if you want to take a look
  3. So I followed the tutorial to control an rgb led from a web server on a raspberry pi (https://www.w3schools.com/nodejs/nodejs_raspberrypi_rgb_led_websocket.asp). However I am trying to use an image stored in the directory of the HTML to use as a button rather than an online image hosting service. I have tried using express.static to no avail I think it might be conflicting with the http server that is used in the tutorial. Any help would be greatly appreciated.
  4. Hey there, I have followed the tutorial for the w3 raspberry pi led pwm Gpio controller using node.js (https://www.w3schools.com/nodejs/nodejs_raspberrypi_rgb_led_websocket.asp) unfortunately though it uses internal scripts and stylesheets. I have tried using express.static to set up file hosting but I couldn’t get it to work. I am needing to host additional files for the web server to read. I am fairly new at node.js so it might have been the way I was trying to implement it that caused the issue. Thanks in advance
×
×
  • Create New...