HaxeFoundation / haxelib

The Haxe library manager
https://lib.haxe.org/
MIT License
173 stars 77 forks source link
haxe haxelib-client haxelib-server package-manager

Haxelib: library manager for Haxe

Haxelib is a library management tool shipped with the Haxe Toolkit.

It allows searching, installing, upgrading and removing libraries from the haxelib repository as well as submitting libraries to it.

For more documentation, please refer to https://lib.haxe.org/documentation/

Development info

Running the haxelib server for development

The server has to be compiled with Haxe 3.2.1+. It can be run in Apache using mod_neko / mod_tora.

Currently using Earthly and Docker is the simpliest way to build and run the server. It doesn't require setting up Apache or MySQL since everything is included in the containers. We would recommend to use the Docker Platform instead of the Docker Toolbox.

To build the server, run:

earthly +haxelib-server

To start, run:

docker-compose -f test/docker-compose.yml up -d

The command above will copy the server source code and website resources into a container, compile it, and then start Apache to serve it. To view the website, visit http://localhost/ (or http://$(docker-machine ip)/ if the Docker Toolbox is used).

Since the containers will expose port 80 (web) and 3306 (MySQL), make sure there is no other local application listening to those ports. In case there is another MySQL instance listening to 3306, we will get an error similar to Uncaught exception - mysql.c(509) : Failed to connect to mysql server.

To stop the server, run:

docker-compose -f test/docker-compose.yml down

If we modify any of the server source code or website resources, we need to rebuild the image and replace the running container by issuing the commands as follows:

earthly +haxelib-server
docker-compose -f test/docker-compose.yml up -d

To run haxelib client with this local server, prepend the arguments, -R $SERVER_URL, to each of the haxelib commands, e.g.:

neko bin/haxelib.n -R http://localhost/ search foo

To run tests:

earthly --allow-privileged +ci-tests

Note that the earthly +ci-tests target will create and destroy its own database.

About this repo

Build files:

Folders:

Other files: