Skip to content

Fortran.JS - A blazingly fast web framework powered by Fortran

Notifications You must be signed in to change notification settings

false-fox/fortranjs

Repository files navigation

Fortran.JS Web framework

The best web framework for human-driven websites.

Features

  • Blazingly fast speeds 🚀🚀🚀. Fortran.JS is compiled to machine code and executed on demand.
  • Simplicity 🪑 Web frameworks have become too bloated and slow, Fortran.JS breathes a sigh of relief to overworked developers looking for yet another new framework.
  • Security by obscurity 🔒 Hackers and bad actors don't even know fortran, so how are they going to cause data breaches?
  • Complete integration with fortran, allowing dynamic text or code to be executed
  • React like components utilizing fortran-modules

Custom web server

The custom web server is written in Node.JS, and has custom developer tools, such as:

  • A dev server with automatic building and reloading on changes 🚀🚀🚀
  • A smart compiler that handles everything for you, like compiling multiple files, compiler options, and building with components. 🚀🚀🚀
  • Support for external files in a /public/ directory 🚀🚀🚀
  • Supports 404 pages
  • Executes the compiled executables and returns the HTML output when their url is requested.

Code example:

! webapp.f90
program home
   implicit none

   character(len=*), parameter :: Head = '<!doctype html>' //&
    '<html lang="en">' //&
    '<body>'
   print '(a)', Head

   character(len=*), parameter :: some_dynamic_text = 'Hello, from Fortran!'
   print '(a)', '<h1>', some_dynamic_text, '</h1>'

   print '(a)', '</body></html>'
end program home

Demo

The repository comes with, by default, an advanced demo featuring components and dynamic text in action.

Alt text

Prereqs

  • linux computer (no spawn-fcgi on windows)
  • spawn-fcgi (build from source or install from package manager)
  • nodejs and npm
  • the fortran language

Install

  1. Don't
  2. Install spawn-fcgi, nodejs and fortran for your system
  3. Use "npm run dev" to run a development server that'll auto rebuild
  4. Use "npm run build" to build the server
  5. Use "npm run start" to run the server.

Yes this is satire!

I made this as a joke a year or two ago. I am still ashamed.

Works cited:

[1] Observation of Einstein-Podolsky-Rosen Entanglement on Supraquantum Structures by Induction Through Nonlinear Transuranic Crystal of Extremely Long Wavelength (ELW) Pulse from Mode-Locked Source Array (Freeman, Gordon 1992)

[2] Alt text