-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
Added examples #48
Added examples #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super cool, thanks~! Left a few nitpicks that would be awesome to address.
examples/with-nextjs/package.json
Outdated
}, | ||
"dependencies": { | ||
"next": "latest", | ||
"polka": "0.2.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's bump this to latest
as well 👍
examples/with-apollo/index.js
Outdated
@@ -0,0 +1,52 @@ | |||
const polka = require('polka') | |||
const bodyParser = require('body-parser') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's import it as const { json } = require('body-parser')
then update the usage below too
examples/with-nextjs/index.js
Outdated
app.prepare().then(() => { | ||
const server = polka() | ||
|
||
server.get('*', (req, res) => handle(req, res)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can actually be server.get('*', handle)
since the signatures match.
I'll actually make the changes really quick, you shouldn't have to worry about it 😄 |
Thank you~! 🙌 |
Examples for Next.js and Apollo Server were added