Skip to content

[BREAKING]feat: params and url #1

New issue

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

Merged
merged 1 commit into from
Nov 24, 2022
Merged

[BREAKING]feat: params and url #1

merged 1 commit into from
Nov 24, 2022

Conversation

yusukebe
Copy link
Owner

You can write:

app.post('/entry/:id', ({ params }) => {
  const { id } = params
  return {
    'your id is': id,
  }
})

app.get('/search', ({ url }) => {
  return `Your query is ${url.searchParams.get('q')}`
})

@yusukebe yusukebe merged commit cc59137 into main Nov 24, 2022
@yusukebe yusukebe deleted the feat/params-and-url branch November 24, 2022 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant