Topic: unit - JavaScript module enabled

Is there any chance to enable JavaScript module in Nginx Unit? https://unit.nginx.org/howto/source/#source-njs

Re: unit - JavaScript module enabled

Hi,

> Is there any chance to enable JavaScript module in Nginx Unit?

Sorry, but no.

My repository is dedicated to PHP
Nginx Unit is there only for its php modules

You can probably use upstream RPMs of nginx and modules
and my php modules if you need them.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: unit - JavaScript module enabled

If someone else will struggle with this issue, there is option to use official repository from Nginx team and just unit-php from Remi repo. In order to do this, simply add exclude to remi-safe repo file.

Re: unit - JavaScript module enabled

I was able to look at le libnjs thing

Package is mostly ready
Should be able to provide a new "unit" build shortly

I will appreciate a test to see if it fixes your issue.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: unit - JavaScript module enabled

Please try unit-1.31.1-3.remi which have njs enabled

Notice:
https://github.com/nginx/njs/issues/691
https://github.com/nginx/unit/pull/1036

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: unit - JavaScript module enabled

Very stupid question, but how to install it? "dnf upgrade --refresh" doesn't give me this package. Was looking for any info about test repository, but didn't found anything. I'm eager to test it and provide feedback wink

Re: unit - JavaScript module enabled

Probably have to wait for the used mirror to be synced (usually from a few minutes to a few hours)

Or install from manual download (can't give the link, don't know which distro/version/arch you are running)

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: unit - JavaScript module enabled

OK, I'll try later then. Anyway, I saw that remi repo has testing option. Remi-safe doesn't have test variant?

Re: unit - JavaScript module enabled

And btw I'm using AlmaLinux 9 (el9_3.x86_64). But I'll simply wait for mirror to refresh.

Re: unit - JavaScript module enabled

Else https://rpms.remirepo.net/enterprise/9/ … /unit.html

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: unit - JavaScript module enabled

I can confirm that update works properly. Thank you! Now it's possible to use JS configuration syntax.

Re: unit - JavaScript module enabled

Thanks for the feedback

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi