mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-29 13:52:46 -07:00
feat: update benches to speed up nextjs servers
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
script: 'node_modules/next/dist/bin/next',
|
||||
args: 'start',
|
||||
instances: 'max',
|
||||
exec_mode: 'cluster',
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
export default async function Home(): Promise<JSX.Element> {
|
||||
const { data } = await mockServerSideAPI()
|
||||
return <h1>The random number is: {data}</h1>
|
||||
}
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
const mockServerSideAPI = async (): Promise<{ data: number }> => {
|
||||
return {
|
||||
data: Math.floor(Math.random() * 10),
|
||||
}
|
||||
}
|
||||
|
||||
export default async function Home(): Promise<JSX.Element> {
|
||||
const { data } = await mockServerSideAPI()
|
||||
return <h1>The random number is: {data}</h1>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user