go-aah / aah Goto Github PK
View Code? Open in Web Editor NEWA secure, flexible, rapid Go web framework
Home Page: https://aahframework.org
License: MIT License
A secure, flexible, rapid Go web framework
Home Page: https://aahframework.org
License: MIT License
Ensure framework is doing good on windows OS before first public release.
Add Event Emitter and begin with following Server Events:
OnInit
OnStart
OnShutdown
Currently router doesn't handle this scenario well. So add error message and handling is important.
Hi,
I'm trying the aah framework, and I'm missing the ability to list my existing applications.
I have created 3 apps:
test - api
test2, test3 - web
It would be nice to have something like: aah list
// aah show
(or whatever)
├── test
│ ├── aah.project
│ ├── app
│ ├── config
│ └── i18n
├── test2
│ ├── aah.project
│ ├── app
│ ├── config
│ ├── i18n
│ ├── static
│ └── views
└── test3
├── aah.project
├── app
├── config
├── i18n
├── static
└── views
Thanks!
Joel.
Not all templates use Layout, can you cancel DefaultTmplLayout?
if ess.IsStrEmpty(htmlRdr.Layout) {
htmlRdr.Layout = appDefaultTmplLayout
}
Add support for multiple methods in attribute method
on routes:
user_edit_settings {
# ...
method = "PUT,PATCH"
# ...
}
Goal is achieve configurable Cache-Control
header for static files.
Cache-Control
configurationOnRequest
OnPreReply
OnAfterReply
Hint:
OnPreAuth
and OnPostAuth
in the future.
Simple and Effective Interface is already implemented.
However, currently template/view lacks easy way of adding custom developed template engine in to aah framework and app config.
slice bounds out of range
on aahframework.org/aruntime.v0/stacktrace.go:136
make incremental changes to the template
Currently session scope display on server startup is incorrect. App Session Mode: stateless
Implement Package versioning for all aah framework library/modules and use versioned packages.
Note: currently framework supports multiple sub packages with in controllers package. However it has limitations.
Technically session is part of application security, it makes to move session into security
package.
Also it creates the path for upcoming feature implementation like CORS, CSRF, Security Headers, etc.
link: https://github.com/go-aah/cache or https://github.com/aah-cb/redis-cache
I am responsible for the completion
Currently routes has it own host and port no for domain and sub-domain.
Hi, Does it support creating multiple controllers?
frontend
└ controllers
└ models
backend
└ controllers
└ models
Adding HTTP/2 pusher interface support
aah brings the simple, effective security implementation, inspired by apache shiro security library.
Goal is to provide elegant way to fulfill application security.
List config value is not returned when profile is enabled. Scenario - config profile is enabled and given list key not exists in within env { ... }
, however present outside block.
cfg.StringList("key") // return not found.
Template path confusion?
How do I implement a custom template file path?
views\pages\backend\app\index.html
views\pages\frontend\app\index.html
Problem
app/controllers
->
Package: frontend
Controller: App
Action: Login
Incorrect: It resolves to template views/pages/app/login.html
Correct: It suppose to be views/pages/frontend/app/login.html
When I call ctx.Reply().HTMLf("index.html", data)
Incorrect: It resolves to template views/pages/app/index.html
Correct: It suppose to be views/pages/frontend/app/index.html
If i create an api project with aah new
, appdir/config/routes.conf
contains some options commented out with "Perfect for restful api"..
I am suggesting those be uncommented by default.. For example, a 405
status reply is kind of standard for every api
Implement:
os.Interrupt
, syscall.SIGTERM
OnShutdown
eventOnShutdown
eventserver.timeout.grace_shutdown
localhost {
host = "localhost,127.0.0.1,a.com" ?
}
admin_localhost {
host = "admin.localhost"
}
How can I support multiple domain names?
Thank you!
Goal is to provide capabilities so aah framework users can do effective test cases (unit, functional, integration) for their application.
Note: my goal is not to develop testing framework instead provide test capabilities, so that you can use your choice of test tools. For example: goconvey(as mentioned by @julienkosinski below), ginkgo, testify, etc.
What do you mean by test capabilities?
Test capabilities means - providing ability to create an test instance easily and effectively. Such as Context
, Request
, Response
, Response Recorder
, aah Test Server
, Basic assertions
, etc. So that you can develop/create your test cases with creativity, imagination and of-course acceptance.
Why aah has aahframwork.org/test.v0
library?
Well for writing unit cases within aah framework across all the modules, I have abstracted wth required assertion as library and using it across. Of-course you can use it too :)
Can I go with only aah framework test capabilities?
Yes, you can. I believe it would satisfy your application testing needs in addition to standard testing package. Ultimately it's your choice of testing requirements.
I hope it clarifies the aah
goal.
Goal is to achieve HTML minify with inline JS, CSS (i.e. JS & CSS define on the page) and configuration option to customize it.
Note: This is not a static files minify for JS and CSS.
Goal is to provide hot-reload
capabilities for development, so that it helps developer to have fun development.
To reflect changes made in Static Files (js, css), View template file and Go Source Code without manual intervention (i.e. manually stopping server and starting the aah server). Instead aah CLI will do monitoring/watch on aah project and does automatic stop, compile and start the aah server.
Approach and solution will be done in aah cli tool. It is not applicable for prod
environment profile. It highly recommended to build and deploy the archive for production use.
aah framework delivers static file using standard library func http.ServeContent
, which is by default adds the Last-Modified
response header and by default modern web browser does cache the static files locally.
Solution is to prevent cache and deliver file always- (only for dev
environment profile)
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Expires: 0
Typically every go program gets compiled before the execution. The view template files compiled and stored in memory on server start.
Solution is to reflect code changes - (only for dev
environment profile)
GOROOT
Will try to bring this feature as early as possible.
You can add view via AddViewArg
method also adding support of overriding that value HTML*
with aah.Data
.
# Tune this value based on your use case. Pool doesn't create object unless needed.
# Below numbers are produces good results.
# TODO results reference
pooling {
# used for `aah.Context` and `ahttp.Request`
context = 150
# used for `bytes.Buffer`
buffer = 60
# used for template `import` func
import = 50
}
Provide binder from aah logger to Go Logger. So that third party libraries logging can be binded with aah logger seamlessly.
For e.g: direct to http sever error logging into aah logger
&http.Server {
ErrorLog: log.ToGoLogger(),
// ...
}
Expands the possibilities.
aah.ToMiddleware(h http.Handler)
aah.ToMiddleware(func(w http.ResponseWriter, r *http.Request))
It helps Golang community to convert the third-party or their own net/http middleware into aah framework
On Reddit user epiris reported the possibility of directory traversal vulnerability on Static File delivery.
I have analyzed the issue and pointers from epiris
. aah framework uses http.Dir
internally for serving directory listing. http.Dir
has checks for Dot-Dot
, \
path separator and \x00
char to prevent directory traversal vulnerability
.
However it is good to place the check at framework before processing an incoming directory listing request.
Thanks to epiris for taking out his time.
Note: Static file/directory delivery scenario's protected by http.Dir
.
Note: As per framework design, this issue possibility is only applicable to directory listing, not for static file serve. Since static file config is defined by application user in the routes.conf
. aah framework will not entertaint any request if the definition doesn't match from routes.conf.
Provide configuration from aah.conf
to disable HTTP/2
if need be.
I've set up a rudimentary alternative using Server Extension but might be better in the router itself.
Goal is to differentiate the controller and context implementation appropriately. So that -
Scope and role becomes clear for user and good for framework future.
Goal is achieve auto bind of request values into controller action parameters based on content type.
In addition to that, create an extensible RequestParser
capability by Content-Type
. So that user can write their own request parser by content-type.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.