Skip to content
This repository has been archived by the owner on Jan 30, 2022. It is now read-only.
/ spinnerette Public archive

Simple Janet web development platform in Go, à la PHP

License

Notifications You must be signed in to change notification settings

rushsteve1/spinnerette

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spinnerette: Quickly spin websites with Janet

Spinnerette

Simple Janet web development platform in Go, à la PHP

Building

make

This will handle pulling submodules, building Janet, and then building and linking Spinnerette

If you are hacking on Spinnerette, once make has been called once switch to using go build.

Usage

With the binary built, run the following command:

./spinnerette

Which will start a server on port 9999 then you may visit the examples like the following:

http://localhost:9999/examples/hello.janet

The Makefile does provide a shortcut function for development. Run the following command to compile the spinnerette binary and spin up the web server:

make run

CLI Args

The spinnerette binary accepts the following arguments:

  • --method string The method that Spinnerette will listen on (HTTP, FastCGI, or CGI) (default "http")

  • --port int Port to use for HTTP/FastCGI (default 9999)

  • --root string Webroot files will be found in (default your current working directory)

  • --socket string Socket to use for FastCGI (falls back to TCP with --port)

Example

./spinnerette -port 3000 -root ./examples/

How it Works

The Spinnerette binary starts a webserver that can execute janet files as web pages, similar to PHP but with the sweet, sweet goodness of a modern lisp language inspired by languages like Clojure.

The goal is to allow spinnerette to run on the cheapest of shared web hosts to support rapidly building server-side scripts.

Spinnerette can works with just about any frontend by adding the necessary script tags in the response of your janet or temple files.

See the examples for a look at how it all works.

Where does the name Spinnerette come from?

Spinnerette is a play on the silk-spinning organ spiders possess to create their intricate webs fast.