If you prefer light-weight server + the expressive power of LiveScript, you may build your own server using Node.js and Express.js together with the SimpleCGI "Middleware", which forwards CGI requests to LiveCode Server - rozek.mobi ![]()
* A simple Server for "LiveCode Server" * Server Installation * A few Sample Scripts * A simple Server for "LiveCode Server"
# Server Installation
If not already done, download an installer for your operating system from nodejs.org and install Node.js on your computer - nodejs.org
;
* open a terminal window;
* create a directory for your HTTP server
mkdir WebServer
change to that directory
cd WebServer
install Express.js
npm install express
install SimpleCGI
npm install simplecgi
open a text editor and create a file called WebServer in the current directory. The content of this file is the script shown above - if necessary with any changes you want
users of Mac OS X or Linux should now mark the script as executable
chmod +x WebServer
(Windows users should skip this step)
create a subdirectory for the files the WebServer should deliver:
mkdir www
./WebServer
That's all: users of Mac OS X or Linux may run the script file directly:
Windows users should enter
node WebServer
The newly started server is now waiting for requests on port 8080 - any errors are output to the still open terminal window.