File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
src/BenchmarksApps/TechEmpower/nextjs Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { db } from "./db" ;
2
+ import { Metadata } from 'next'
2
3
3
4
// Force page to render dynamically from the server every request
4
5
export const dynamic = "force-dynamic" ;
5
6
export const revalidate = 0 ;
7
+ export const metadata : Metadata = { viewport : { } } ;
6
8
7
9
export default async function Page ( ) {
8
10
const data = await db . getFortunes ( ) ;
Original file line number Diff line number Diff line change 2
2
module . exports = {
3
3
output : "standalone" ,
4
4
reactStrictMode : true ,
5
+ compress : false ,
6
+ poweredByHeader : false ,
7
+ generateEtags : false
5
8
}
Original file line number Diff line number Diff line change @@ -32,11 +32,12 @@ if (!dev) {
32
32
33
33
//console.log(`server.js found at: ${server}`);
34
34
35
- if ( cluster . isPrimary ) {
35
+ const numWorkers = process . env . WORKER_COUNT ? parseInt ( process . env . WORKER_COUNT ) : os . cpus ( ) . length ;
36
+
37
+ if ( cluster . isPrimary && numWorkers > 1 ) {
36
38
console . log ( `Primary is running on process ${ process . pid } ` ) ;
37
39
38
40
cluster . setupPrimary ( { silent : true } ) ;
39
- const numWorkers = process . env . WORKER_COUNT ? parseInt ( process . env . WORKER_COUNT ) : os . cpus ( ) . length ;
40
41
41
42
// Fork workers
42
43
let listening = 0 ;
You can’t perform that action at this time.
0 commit comments