Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into magne4000/universal-m…
Browse files Browse the repository at this point in the history
…iddleware
  • Loading branch information
brillout committed Nov 25, 2024
2 parents 15a298e + 25c3d6b commit 49afb5b
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions packages/vike-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@

# `vike-node`

Node integration for Vike.
Server integration for Vike.

With this extension, your server code is transpiled with Vite.

With this extension, your server-side code is transpiled with Vite.<br>
In development, the server process is restarted when a change is detected in some of your server files.

[Installation](#installation)
Expand Down Expand Up @@ -49,7 +50,7 @@ In development, the server process is restarted when a change is detected in som
function startServer() {
const app = express()
app.use(vike())
const port = process.env.PORT || 3000
const port = 3000
app.listen(port, () => console.log(`Server running at http://localhost:${port}`))
}
```
Expand Down Expand Up @@ -155,7 +156,7 @@ startServer()
function startServer() {
const app = express()
app.use(vike())
const port = process.env.PORT || 3000
const port = 3000
app.listen(port, () => console.log(`Server running at http://localhost:${port}`))
}
```
Expand All @@ -173,7 +174,7 @@ startServer()
function startServer() {
const app = fastify()
app.all('/*', vike())
const port = +(process.env.PORT || 3000)
const port = 3000
app.listen({ port }, () => console.log(`Server running at http://localhost:${port}`))
}
```
Expand All @@ -192,7 +193,7 @@ startServer()
function startServer() {
const app = new Hono()
app.use(vike())
const port = +(process.env.PORT || 3000)
const port = 3000
serve(
{
fetch: app.fetch,
Expand All @@ -217,7 +218,7 @@ startServer()
async function startServer() {
const app = createApp()
app.use(vike())
const port = process.env.PORT || 3000
const port = 3000
const server = createServer(toNodeListener(app)).listen(port)
server.on('listening', () => {
console.log(`Server running at http://localhost:${port}`)
Expand All @@ -238,7 +239,7 @@ startServer()
function startServer() {
const app = new Elysia()
app.get('/*', vike())
const port = +(process.env.PORT || 3000)
const port = 3000
app.listen(port, () => console.log(`Server running at http://localhost:${port}`))
}
```
Expand Down

0 comments on commit 49afb5b

Please sign in to comment.