0

Hi I would like to ask if I want to build a web program with my raspberry pi and this web program runs offline, is it possible? I put everything in localhost so the raspberry literally runs back the localhost without connecting to the Internet.

1

Yes, this is possible and commonplace. You can access the server via localhost, obviously enough. You should not have to do anything special in terms of configuring the server.

If you do not want it to accept requests from outside, you can either use the webserver itself to restrict this, or a firewall. However, this is probably not a significant issue on a home LAN.

  • thank you for it but if I want to use the web program that i created to link directly to the Scratch programming that were build inside the raspberry pi, is it possible? – Kho Chung Ning Oct 2 '15 at 16:34
  • If you mean you want to embed a Scratch application in a web page, almost certainly the answer is no. You will get more help with Scratch on our much larger parent site, Stack Overflow, since it is not particular to the pi. – goldilocks Oct 2 '15 at 16:47
  • Thank you very much. Lastly it i want to link the web application to the Scratch.exe file like how hyperlink function, is it possible? – Kho Chung Ning Oct 2 '15 at 17:05
  • If what you want to do is have the server execute a command (such as a Scratch application) via a web page, then the answer is certainly yes. How you do that of course depends on what web server you use, etc. – goldilocks Oct 2 '15 at 17:21
  • Thanks goldilocks and darrylh, thank you for the answer. – Kho Chung Ning Oct 4 '15 at 1:21
1

Yes. I've done this frequently, using node.js as a web server. There are many Node.js (NPM) modules that can provide access to the GPIO pins, I2C, SPI and even the Raspberry Pi Camera.

Not the answer you're looking for? Browse other questions tagged or ask your own question.