Runnning nodejs app in a jail

Ratcen

Cadet
Joined
May 26, 2021
Messages
1
Hello,

I was wondering how I could run a nodejs app into a jail.
I have
  • created a jail (classic config, DHCP [giving me a 192.168.0.XX to access])
  • installed node
  • added a mounted point to somewhere I can access to edit files (with a special dir in /root)
I am able to run the node app.js , everything is nominal. no errors.

My app.js is running so it can read a html file and output it in the browser
Code:
http.createServer(getFilename).listen(1000)

So I then go the 192.168.0.XX:1000/index.html
And i get 404.

I checked the mount point, everything is fine, i ran ls and index.html exist and is full of a magnificent html code.

So basically my question is : Am I too much of a newbie and just can't have "createServer" into a truenas jail ? Or am I missing something else ? if so, what am I missing ? Or How can I make it work ?

Thanks for your help,

Ratcen

PS: I do not want this app to be accessible externally, it is meant to be a local webpage. So there are no dynDNS or such things, and I don't plan to open it to the wilds.
TrueNas is running on (no comment on over/under kill hardware, It is purely a back-of-the-shelf-fun-project with no professional nor important things. I only recycled old components to make something new out of it, no matter how ridiculous it may be)

  • asus Z77-A (internal network)
  • Intel® Core™ i5-3570K
  • 16 GB RAM
  • HDD
    • WDC WD10EZRX-00A8LB0
    • WDC WD5003AZEX-00K1GA0
    • WDC WD10EZRX-00A8LB0
 
Top