프로젝트
소개
Easy-to-use, modular web framework built for V
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 0
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalEasy-to-use, modular web framework for V.

module main
import nedpals.vex.router
import nedpals.vex.server
import nedpals.vex.ctx
fn print_req_info(mut req ctx.Req, mut res ctx.Resp) {
println('${req.method} ${req.path}')
}
fn do_stuff(mut req ctx.Req, mut res ctx.Resp) {
println('incoming request!')
}
fn main() {
mut app := router.new()
app.use(do_stuff, print_req_info)
app.route(.get, '/', fn (req &ctx.Req, mut res ctx.Resp) {
res.send_file('index.html', 200)
})
app.route(.get, '/public/*path', fn (req &ctx.Req, mut res ctx.Resp) {
res.send_file('public/' + req.params['path'], 200)
})
app.route(.get, '/path/:name', fn (req &ctx.Req, mut res ctx.Resp) {
println('path is ${req.params["name"]}')
}, fn (req &ctx.Req, mut res ctx.Resp) {
res.send('path: ' + req.params['name'], 200)
})
app.route(.get, '/complex/:name/*path', fn (req &ctx.Req, mut res ctx.Resp) {
res.send('username: ' + req.params['name'] + '\npath: ' + req.params['path'], 200)
})
server.serve(app, 6789)
}
Installation & Getting Started
Learn how to setup and use VEX by reading the Wiki.
Roadmap
- Support for
GET,POST,PUT,PATCH,DELETE, andOPTIONHTTP methods. - HTTP Router (Wildcards are now supported)
- Route groups (non-reusable for now)
- Static file server
- Params and query parsing
- Middleware support
- Cookie parsing (basic support)
- Cookie manipulation / Session support
- Websocket Server
- Body parsing
-
application/x-www-form-urlencodedsupport -
application/jsonsupport -
multipart/form-datasupport
-
Contributing
- Fork it (https://github.com/nedpals/vex/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Examples
Examples can be found at the /examples directory.
License
Contributors
- Ned Palacios - creator and maintainer
관련 프로젝트 살펴보기
불러오는 중…