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.

2 Answers 2

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.

5
  • 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? Commented Oct 2, 2015 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. Commented Oct 2, 2015 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? Commented Oct 2, 2015 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. Commented Oct 2, 2015 at 17:21
  • Thanks goldilocks and darrylh, thank you for the answer. Commented Oct 4, 2015 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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.