Nomad node pages #559
-
I created index.mu and put a simple hello world. That file is in storage/pages. What does this mean and how do I fix it? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
If you made the file executable (with
As the first line of the file. If this is a compiled executable, you obviously don't do that, and it should be able to just run as-is. If you just want to send the file contents to the client, as a static page, just make the file non-executable. This functionality is set up so you can make both simple static pages, and full-blown interactive apps, that run on any kind of backend. You could write them in Python, PHP, Lua and even compiled languages like C or Rust. |
Beta Was this translation helpful? Give feedback.
-
That is exactly the problem- Thank you so much. The permissions make complete sense now that I understand. I gotta say: nomadnet is the coolest things I've seen in a very very long time. Thank you thank you thank you. |
Beta Was this translation helpful? Give feedback.
If you made the file executable (with
chmod a+x index.mu
for example), nomadnet will try to execute the file, and return the output of it to the user, instead of just sending the file contents. In case you do that, you will need to specify to the shell what kind of program the file actually is. If it is a python program, for example, you do this by adding something like:#!/usr/bin/env python3
As the first line of the file. If this is a compiled executable, you obviously don't do that, and it should be able to just run as-is.
If you just want to send the file contents to the client, as a static page, just make the file non-executable.
This functionality is set up so you can make both simp…