]> git.cworth.org Git - zombocom-ai/blobdiff - index.js
Hook the code panel up to actually execute something
[zombocom-ai] / index.js
index 9b7270b7673e03e1ae78c803b68c6af054551b9f..b0a115f79dd8d0e1393cde0600838203df5e19a7 100644 (file)
--- a/index.js
+++ b/index.js
@@ -15,7 +15,7 @@ const port = 2122;
 
 const python_path = '/usr/bin/python3'
 const generate_image_script = '/home/cworth/src/zombocom-ai/generate-image.py'
-const run_turtle_script = '/home/cworth/src/zombocom-ai/run-turtle.py'
+const interpret_cairo_script = '/home/cworth/src/zombocom-ai/interpret-cairo-to-svg.py'
 const state_file = 'zombocom-state.json'
 const targets_dir = '/srv/cworth.org/zombocom/targets'
 const images_dir = '/srv/cworth.org/zombocom/images'
@@ -197,7 +197,7 @@ io_bus.on("connection", (socket) => {
 
     socket.on('run', code => {
        try {
-           output = child_process.execFileSync(python_path, [run_turtle_script, code], { input: code });
+           output = child_process.execFileSync(python_path, [interpret_cairo_script, code], { input: code });
            // Grab just first line of output
            const nl = output.indexOf("\n");
            if (nl === -1)