You can edit almost every page by Creating an account. Otherwise, see the FAQ.

HappyX

From EverybodyWiki Bios & Wiki





Script error: No such module "Draft topics". Script error: No such module "AfC topic".

HappyX
HappyX web framework
Original author(s)Ethosa
Developer(s)HappyX contributors.[1]
Initial releaseJune 2023; 11 months ago (2023-06)[2]
Stable release
2.6.1 / August 23, 2023
Repositorygithub.com/HapticX/happyx
Written inNim[3]
Engine
    Operating systemCross-platform
    PlatformIA-32, x86-64, ARM, Aarch64, RISC-V, PowerPC ...[4]
    Size0.2 MB[5]
    TypeWeb framework
    LicenseMIT License
    Websitehttps://hapticx.github.io/happyx

    Search HappyX on Amazon.


    HappyX is a free and open-source macro-oriented full-stack web framework written in Nim programming language.

    Product-ready projects has very small size due to metaprogramming (macro-oriented). HappyX compiles only those parts of the framework that the developer uses.

    HappyX allows make Server-side scripting, static site generation and single-page applications.

    Inspired By[edit]

    HappyX inspired by other web frameworks: Vue.js, React.js, FastAPI.

    The components[6] came from Vue.js and React.js. Powerful routes, request models[7] came from FastAPI.

    Server-Side[edit]

    HappyX provides efficient server-side with powerful routing system, request models, CORS and template processor.

    Server-side HappyX projects is very fast[8]

    Hello, World![edit]

    Here is "Hello, world!" example at HappyX server-side.

    import happyx  # import framework. It's required
    
    # Launch server at http://127.0.0.1:5000/
    serve "127.0.0.1", 5000:
      # on GET method at /
      get "/":
        # Respond
        return "Hello, world!"
    

    Client-Side[edit]

    HappyX provides efficient client-side with powerful routing system and components.

    Hello, World![edit]

    Here is "Hello, world!" example at HappyX client-side.

    import happyx  # import framework. It's required
    
    # application start point (in tag with ID="app")
    appRoutes "app":
      # on example.com/#/
      "/":
        # Write HTML
        tDiv:
          "Hello, world!"
    

    Routing System[edit]

    HappyX has powerful routing system. There are path params and request models support. It's optimized and fast due to metaprogramming.

    Example[edit]

    # Declare Request model
    model MyModel:
      # Field "name" of type "string" with default value "Ethosa"
      name: string = "Ethosa"
    
    serve "127.0.0.1", 5000:
      # /user/ is allow
      # /user/1 is allow
      # /user/asd is deny
      get "/user/$id?:int":
        # Developer may use path param as immutable variable
        # due to metaprogramming
        echo id
        # Respond JSON
        return {"response": id}
      # / with JSON body
      # {"name": "..."}
      post "/[m:MyModel]":
        echo m.name
        return {"response": m.name}
    

    Version History[edit]

    HappyX developed since April, 2023

    Version Release date Release Notes Nim version
    Old version, no longer supported: 0.27.1 May 26, 2023 release notes 1.6.12
    Old version, no longer supported: 1.0.0 June 1, 2023 release notes 1.6.12
    Old version, no longer supported: 1.7.1 July 1, 2023 release notes 1.6.14
    Old version, no longer supported: 1.8.1 July 3, 2023 release notes 1.6.14
    Old version, no longer supported: 1.9.0 July 15, 2023 release notes 1.6.14
    Old version, no longer supported: 1.10.1 July 26, 2023 release notes 1.6.14
    Old version, no longer supported: 1.12.0 July 30, 2023 release notes 1.6.14
    Older version, yet still supported: 2.0.0 August 09, 2023 release notes 1.6.14
    Current stable version: 2.6.1 August 23, 2023 release notes 1.6.14
    Legend:
    Old version
    Older version, still supported
    Latest version
    Latest preview version
    Future release


    See also[edit]


    Other articles of the topic Computer programming : Programmer, Software developer, Software release life cycle
    Some use of "" in your query was not closed by a matching "".Some use of "" in your query was not closed by a matching "".

    References[edit]

    1. "HappyX contributors". GitHub. 2023-07-15. Retrieved 2023-07-16.
    2. Ethosa (June 1, 2023). "HappyX first major release". GitHub. Retrieved June 1, 2023.
    3. "Install Nim". Retrieved 2023-07-01.
    4. "Packaging Nim". Retrieved 2023-07-01.
    5. "HappyX Download". GitHub. Retrieved 2023-07-01.
    6. "HappyX Components". May 9, 2023.
    7. "HappyX Request models". 2023-05-19.
    8. "Web frameworks benchmark". 2023-07-17. Retrieved 2023-07-19.


    This article "HappyX" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:HappyX. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.