A small webapp that allows to test Haxe online
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
assets Increase font size of embedded code Nov 21, 2017
examples jsontest has no HTTPS Apr 19, 2017
.gitignore allow cors Jul 7, 2017
.travis.yml bump travis haxe version Jul 7, 2017
build.hxml rely on js.JQuery rather than JQueryExtern Apr 7, 2014
console.css Indeed @clemos, it's better with CSS Nov 18, 2016
haxe-logo.png HTTPS (closes #105) Apr 11, 2017
haxe-logo.svg HTTPS (closes #105) Apr 11, 2017
haxe-nav.css This will update the navigation to the new format. Mar 1, 2016
highlighter.min.css HTTPS (closes #105) Apr 11, 2017
index.html Updated connect-menu Dec 18, 2017
redirect.html initial implementation of source loading Nov 15, 2014
share.png update share image Mar 31, 2016
style.css further mobile fixes : remove min-width, increase min_height Jul 7, 2017
swf.css swf support integration Jun 7, 2012



Build Status

The try-haxe project is a browser-based IDE for testing Haxe code. It provides a quick and easy environment for playing with the Haxe language and compiles to JavaScript or Flash, instantly viewable in the browser. It also allows saving and sharing of programs with the auto-generated hyperlink hash-codes.

The official project is hosted at try.haxe.org.

Technical notes:

The try-haxe project is written in Haxe, with part of the application compiling to JavaScript for use on the client, and part of the application compiling to PHP as a backend service. The backend PHP service provides server-side compilation of programs as well as language auto-complete results.

Run your own instance:

You can run the try-haxe project on a server with Apache, PHP, and Haxe installed. Some commands may be distribution-specific (location of web server root, etc) -- the below works on Ubuntu.

Clone the repo and initialize the submodules:

git clone https://github.com/clemos/try-haxe.git
cd try-haxe
git submodule init
git submodule update

You may need to update the location of the haxe compiler executable in the Compiler.hx source file, line 26. You can specify a full path to your haxe compiler, such as:

public static var haxePath = "/opt/haxe-3.1.3/haxe";

Build the try-haxe compiler and app:

haxe build.hxml

Link (or copy) this project directory to a location served by Apache (or other PHP-enabled web server):

sudo ln -s `pwd` /var/www/

The above creates a /var/www/try-haxe symlinked to your git repo.

Create the tmp directory (where web-based projects will be created and saved):

mkdir tmp
chmod a+rw tmp

Ensure Apache has mod_rewrite enabled:

sudo a2enmod rewrite

Edit the apache configuration file and add the /var/www/try-haxe location with AllowOverrides All directive (so it can use the .htaccess file):

sudo emacs /etc/apache2/sites-available/default

Add a <Directory> entry like so:

# Required by try-haxe
<Directory /var/www/try-haxe>
  Options FollowSymLinks
  AllowOverride All

Restart the apache server:

sudo /etc/init.d/apache2 restart

Navigate to your server (by name, ip address, or localhost) and enjoy try-haxe! http://localhost/try-haxe/