HappyX
Script error: No such module "Draft topics".
Script error: No such module "AfC topic".
Original author(s) | Ethosa |
---|---|
Developer(s) | HappyX contributors.[1] |
Initial release | June 2023[2] |
Stable release | 2.6.1
/ August 23, 2023 |
Repository | github |
Written in | Nim[3] |
Engine | |
Operating system | Cross-platform |
Platform | IA-32, x86-64, ARM, Aarch64, RISC-V, PowerPC ...[4] |
Size | 0.2 MB[5] |
Type | Web framework |
License | MIT License |
Website | https://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 |
---|---|---|---|
0.27.1 | May 26, 2023 | release notes | 1.6.12 |
1.0.0 | June 1, 2023 | release notes | 1.6.12 |
1.7.1 | July 1, 2023 | release notes | 1.6.14 |
1.8.1 | July 3, 2023 | release notes | 1.6.14 |
1.9.0 | July 15, 2023 | release notes | 1.6.14 |
1.10.1 | July 26, 2023 | release notes | 1.6.14 |
1.12.0 | July 30, 2023 | release notes | 1.6.14 |
2.0.0 | August 09, 2023 | release notes | 1.6.14 |
2.6.1 | August 23, 2023 | release notes | 1.6.14 |
Old version Older version, still supported Latest version |
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 "".
- Comparison of web frameworks
- Web frameworks benchmark
- HappyX RestAPI tutorial series
- HappyX documentation
References[edit]
- ↑ "HappyX contributors". GitHub. 2023-07-15. Retrieved 2023-07-16.
- ↑ Ethosa (June 1, 2023). "HappyX first major release". GitHub. Retrieved June 1, 2023.
- ↑ "Install Nim". Retrieved 2023-07-01.
- ↑ "Packaging Nim". Retrieved 2023-07-01.
- ↑ "HappyX Download". GitHub. Retrieved 2023-07-01.
- ↑ "HappyX Components". May 9, 2023.
- ↑ "HappyX Request models". 2023-05-19.
- ↑ "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.