Coder Social home page Coder Social logo

crazyh2 / hostscript Goto Github PK

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

A programming language just for hosting websites. It's based off express.js and can integrate with NodeJS as well. If your used to using JavaScript, TypeScript, Deno, Bun or NodeJS then this will feel similar.

License: Other

Shell 52.91% Batchfile 27.74% JavaScript 19.35%
coding coding-language coding-languages custom custom-language custom-languages express-js expressjs hosting javascript

hostscript's Introduction

HostScript

A programming language just for hosting websites. It's based off express.js and can integrate with NodeJS as well

Features

  • Ease Of Use: HostScript simplifies common hosting features such as routing, serving files and deploying websites.
  • Focused Functionality: The language is tailored specifically for web hosting, ensuring that developers have access to all the necessary tools and functionalities without unnecessary complexity.
  • Cross-Platform Compatibility: HostScript is designed to be platform-independent by using NodeJS as a base, allowing it to run seamlessly on various operating systems and hosting environments.
  • Extensibility: With how HostScript was designed, it is very easy to integrate it with existing NodeJS code. This is possible due to how HostScript compiles into NodeJS during runtime

Getting Started

To get started with HostScript, follow these steps:

  1. Installation: Download and install the HostScript terminal/compiler on your system. Detailed installation instructions can be found here.

  2. Starter Script: Write your first HostScript (.hs) script to get a feel for the language. Here's a simple example:

    use http as @;
    
    get("/home") {
        text("This is home!");
    };
    
    get("/file") {
        file("/views/index.html");
    };
    
    post("/update", { user: string, data: object }) { -- The request needs the body to have a user value and its type to be a string.
        json({ success: true, message: "Data successfully updated" })
    };
    
    -* This is a comment that works on
    multiple lines!*-
  3. Windows only: If your on windows you will have to open the HostScript terminal manually otherwise if your on MacOS or Linux just use the normal terminal. To open the HostScript terminal run %ProgramFiles%\hostscript\terminal.bat

  4. Run Scripts: Run your starter script by running hs script.js in the directory of the starter script you made.

  5. Explore Documentation: Refer to the documentation for detailed information on HostScript syntax, features, and usage.

Installation

To install HostScript, do the following:

  1. Prepare: Make sure you have NodeJS installed and it's on the latest version. If you don't have it you can get it here
  2. Download: Download the repository code and unzip it.
  3. Install Terminal/Compiler: Open the downloaded folder in your shell (If your on windows use administrator mode) and run (sudo ./install.sh for MacOS and Linux) or (./install.bat for Windows).

Contributing

Contributions to HostScript are welcome! If you'd like to contribute, please follow these guidelines:

  • Fork the repository.
  • Create a new branch for your feature or bug fix.
  • Make your changes and ensure that they adhere to the coding standards and conventions.
  • Write tests to cover your changes.
  • Submit a pull request, clearly describing the changes you've made and why they are needed.

License

HostScript is released under the Attribution-NonCommercial 4.0 International License.

hostscript's People

Contributors

crazyh2 avatar

Stargazers

 avatar

Watchers

 avatar

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.