Skip to content
Simple FastCGI server to run node/javascript serverside
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

JS FastCGI Server

A FastCGI server that allows you to run node/javascript server-side

It's currently in very early stages and loosely inspired by CGI-Node



Install dependencies using npm install or yarn add then start the server using npm start or yarn start

Now all you have to do is configure your webserver (apache/nginx/caddy) to use the FastCGI server and you're good to go

Apache example (requires mod_fastcgi)

    ServerAdmin root@host
    DocumentRoot /var/www/example
    AddHandler jss-fastcgi .jss
    FastCgiExternalServer /var/www/example -host

Nginx example

location ~ [^/]\.jss(/|$) {
    fastcgi_split_path_info ^(.+?\.jss)(/.*)$;
    if (!-f $document_root$fastcgi_script_name) {
        return 404;

    fastcgi_param HTTP_PROXY "";

    fastcgi_index index.jss;
    include fastcgi_params;

Caddyfile example {
  root /var/www/example
  fastcgi / {
    ext .jss
    split .jss
    index index.jss

Code example


Hello <?js=request.server['remote_addr']?>,<br />
Here is your user-agent:<?js=request.headers.user_agent?>. <br />
Let me count to 10 for you:<br />
<?js for(var i = 1; i <= 10; i++) { write(i + ' '); } ?>


js-fastcgi PHP
write() echo
include() include
response.header() header()
request.server $_SERVER
request.query $_GET $_POST $_FILES
request.cookies $_COOKIES
You can’t perform that action at this time.