GithubHelp home page GithubHelp logo

byteskript / byteskriptquery Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 20 KB

A library for deploying ByteSkript as a backend web technology.

Java 100.00%
byteskript skript skript-addon web-application webserver language

byteskriptquery's Introduction

ByteSkriptQuery

A language library for ByteSkript that allows it to be deployed as a backend web language. Not only does this allow the creation of adaptable webservers, but also allows the Skript language to be used within compiled webpages.


ByteSkriptQuery has two functions: as a language library to add basic HTTP-server management syntax and tools, and as a separate compiler for using integrated Skript in webpages, similar to PHP's mixed functionality.

Backend Skript Code

ByteSkriptQuery provides syntaxes for starting, stopping and otherwise managing simple HTTP servers. Events for receiving queries and effects for writing text to the response are also available.

image

Integrated Skript Code

Simple Skript code can be integrated into .bsq pages using the <% %> tag. Code is always treated as a full line (or lines) rather than a simple expression.

Multi-line code may be written in these tags, but indentation needs to be respected. The write and write line effects can be used to put text/html into the result in situ.

<html>
<body>
<p>
    This page was made from a combination of Skript and HTML!
    It uses Java <%write 15 + 2%>.
</p>

<%
set {name} to "User"
write line "<h1>Hello, " + {name} + "!</h1>"
if true is true:
    write line "<h2>true :)</h2>"
else:
    write line "<h2>false :(</h2>"
%>
</body>

example

Page Compiling

Integrated pages are compiled when requested, making re-delivering them much faster and reducing compiler strain that would otherwise come from refreshing the page rapidly. However, to make sure that live testing is possible, the compiled page's expected content is periodically checked with the source file, so any changes to the source will be reflected in the live version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.