Giter VIP home page Giter VIP logo

try-haxe's Introduction

This project is dead and won't be maintained anymore. Sorry :(

try-haxe

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, Flash or Neko, 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. The backend uses Docker to enable the use of multiple Haxe versions and macro support.

Run your own instance:

This guide has been tested on Ubuntu 16.04 desktop and server.

Clone this git repo and initialize its submodules:

git clone --recursive https://github.com/mrcdk/try-haxe -b docker

Install the needed libraries and build the try-haxe project:

cd try-haxe
haxelib install build.hxml
haxe build.hxml

Install docker following this guide.

Download the docker image that will be used when the compilation is triggered. This image thecodec/haxe-3.3.0.slim is a stripped down image that only contains the needed functionality to run haxe and neko. The server will mount the selected haxe version and the haxelib libraries when compiling.

docker pull thecodec/haxe-3.3.0.slim

Setup Apache and PHP:

  • Install Apache and PHP:
sudo apt-get install apache2 php libapache2-mod-php
  • Create a symlink from the project root folder to /var/www
sudo ln -s `pwd` /var/www
  • Create the tmp folder where the code will be saved:
mkdir tmp
chmod a+rw tmp
  • Enable the Apache rewrite module:
sudo a2enmod rewrite
  • Edit the Apache configuration file with:
sudo nano /etc/apache2/sites-available/000-default.conf
  • Modify the file adding the try-haxe directory configuration:
<VirtualHost>

    ...

    DocumentRoot /var/www
    
    <Directory "/var/www/try-haxe">
        Options FollowSymLinks
        AllowOverride All
    </Directory>

    ...

</VirtualHost>
  • Finally restart Apache:
sudo systemctl restart apache2

Create a group dockerand add the users www-data and your current user to it:

sudo groupadd docker
sudo gpasswd -a ${USER} docker
sudo gpasswd -a www-data docker

Then restart the docker service:

sudo service docker restart

Add the Haxe libraries that will be used by the site inside haxe/haxelib

  • Change the haxelib install path to haxe/haxelib
haxelib setup haxe/haxelib
  • Install all the libs from the install.hxml inside haxe/haxelib
haxelib install haxe/haxelib/install.hxml 

Add the Haxe versions that will be listed in the site inside haxe/versions

You can use haxe downloader.hxml to download the latest Haxe development version.

try-haxe's People

Contributors

as3boyan avatar azrafe7 avatar clemos avatar dr-emann avatar gama11 avatar markknol avatar mrcdk avatar nicom1 avatar pleclech avatar profelis avatar tariqbenezza avatar tkawachi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

try-haxe's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.