A compilation API server for Axentax syntax using axentax-compiler.
sample url: https://validation-api.axentax.com/compiler?syntax=%40%40+%7B+Cm7+%7D
npm install
npm run dev
# Bundle and generate single dist/index.js
npm run bundle
# Start with single file (in dist directory)
node dist/index.js
# Or in one go
npm start
Starts on port 3000 by default. Can be changed with the PORT environment variable.
Compiles Axentax syntax and verifies success/failure.
conduct=true returns 200 with JSON.For GET requests, pass the encoded syntax in the syntax query parameter.
{
"syntax": "@@ { C D E }"
}
Success (200 OK) — with ?conduct=true
{
"message": "Compilation successful",
"compiledData": { ... }
}
Success (204 No Content) — without query
No body
Error (400 Bad Request)
{
"error": "Error message"
}
Server health check
{
"status": "OK",
"message": "Axentax Compiler Server is running"
}
# To receive 200 + JSON
curl -X POST 'http://localhost:3000/compiler?conduct=true' \
-H 'Content-Type: application/json' \
-d '{"syntax": "@@ { C D E }"}'
# For 204 (No Content) (no query)
curl -X POST 'http://localhost:3000/compiler' \
-H 'Content-Type: application/json' \
-d '{"syntax": "@@ { C D E }"}' -i
# Also available with GET (pass syntax as query)
curl 'http://localhost:3000/compiler?syntax=%40%40%20%7B%20C%20%7D&conduct=true'
curl -i 'http://localhost:3000/compiler?syntax=%40%40%20%7B%20C%20%7D'
const response = await fetch('http://localhost:3000/compiler', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
syntax: '@@ { C D E }'
})
});
const result = await response.json();
console.log(result);
@@ {
C D E F G A B
}
@@ 120 {
C C C C
}
@@ D|A|D|G|A|D {
2|2|2|0|0|0
}
For detailed syntax information, refer to the axentax-compiler documentation.
Axentax Playground: https://axentax.github.io/axentax-playground/
This project is provided under the license described in the LICENSE file.