Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
+import { exit } from 'node:process'
import express, { type Express, type Request, type Response } from 'express'
import { requestHandlerPool } from './pool.js'
import express, { type Express, type Request, type Response } from 'express'
import { requestHandlerPool } from './pool.js'
})
} catch (err) {
console.error(err)
})
} catch (err) {
console.error(err)
import { dirname, extname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { dirname, extname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
+import { exit } from 'node:process'
import Fastify from 'fastify'
import { fastifyPoolifier } from './fastify-poolifier.js'
import Fastify from 'fastify'
import { fastifyPoolifier } from './fastify-poolifier.js'
await fastify.listen({ port })
} catch (err) {
fastify.log.error(err)
await fastify.listen({ port })
} catch (err) {
fastify.log.error(err)
-const isCIEnvironment = process.env.CI != null
+const { env } = require('node:process')
+
+const isCIEnvironment = env.CI != null
if (isCIEnvironment === false) {
require('husky').install()
}
if (isCIEnvironment === false) {
require('husky').install()
}
import * as os from 'node:os'
import * as os from 'node:os'
+import { env } from 'node:process'
import { dts } from 'rollup-plugin-dts'
import terser from '@rollup/plugin-terser'
import typescript from '@rollup/plugin-typescript'
import { dts } from 'rollup-plugin-dts'
import terser from '@rollup/plugin-terser'
import typescript from '@rollup/plugin-typescript'
return availableParallelism
}
return availableParallelism
}
-const isDevelopmentBuild = process.env.BUILD === 'development'
-const isAnalyzeBuild = process.env.ANALYZE
-const isDocumentationBuild = process.env.DOCUMENTATION
+const isDevelopmentBuild = env.BUILD === 'development'
+const isAnalyzeBuild = env.ANALYZE
+const isDocumentationBuild = env.DOCUMENTATION
const maxWorkers = Math.floor(availableParallelism() / 2)
const maxWorkers = Math.floor(availableParallelism() / 2)