CandyScript is a lightweight yet superfast language for forging small web servers and RestAPIs. It is inspired by littledivy/candyscript but does a lot more.
- Line-by-line parser
- Relatively fast thanks to Nim's
asynchttpserver
- Short and efficient
- A single binary for everything
- Interface with a SQLite database
- Fetch external URLs
- Mustache templates
- Get data from command lines
- Variable substitution system
- Authentication with http basic
- Sessions (though probably not that secure)
- Clean up the mess with variable substitution
- Easily grab data from FETCH requests
- Tests
- More examples
- Use
httpbeast
instead ofasynchttpserver
- Make it robust, fast and secure
# this is a comment
GET / Hello, World!
For a more advanced usage, see the examples.
Use the Nim compiler to build source code.
This code will run your candyscript server.
nimble build
./candyscript your_script.candy
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.