Skip to content

Traditional edit refresh development with Vibe.d

Sean Charles edited this page Mar 13, 2014 · 1 revision

This is a copy of my blog post about how you can write a simple Bash script to allow a traditional edit-refresh development process using Vibe.d

http://objitsu.com/wp/2014/03/13/traditional-edit-compile-refresh-for-d-and-vibe-d/

Register a shutdown api, something like this:

router.get("/api/shutdown", &shutdownNow);

Implement the above handler like so:

void shutdownNow(HTTPServerRequest req, HTTPServerResponse res) { vibe.core.core.exitEventLoop(); }

Use this Bash script to endlessly run "dub" and then do it again when you hit shutdown!

while true; do dub; done

That's it. Now run the script and play away. When you have made code changes and you want to see them, hit the shutdown option in your browser and the script will rinse and repeat.