We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This code works:
const router = createRouter() .get('/', () => 'Hello World!') .get('/hello/:name', req => `Hello ${req.context.params.name}!`) app.use(router)
But this wont:
app.use("/",(req,res)=> `Hello ${req.context.params.name}!`)
And app.get doesnt even exist like expressjs has... I dont want to create a new router, but straight away use app.use if possible. Thanks.
app.get
The text was updated successfully, but these errors were encountered:
Hi dear @renhiyama. You should use eventHandler wrapper to create new handlers. Legacy (req, res) is going to be unsupported soon.
eventHandler
(req, res)
import { eventHandler } from 'h3' app.use("/", eventHandler((event)=> `Hello ${event.context.params.name}!`))
Also @nozomuikuta made a some new utils to access params. Check #158.
Sorry, something went wrong.
No branches or pull requests
This code works:
But this wont:
And
app.get
doesnt even exist like expressjs has...I dont want to create a new router, but straight away use app.use if possible. Thanks.
The text was updated successfully, but these errors were encountered: