mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 21:16:21 +00:00
fix: lock to never read when site is building
This commit is contained in:
parent
9d2340e90b
commit
98d82415dc
1 changed files with 2 additions and 0 deletions
|
@ -457,6 +457,7 @@ See the [documentation](https://quartz.jzhao.xyz) for how to get started.
|
||||||
req.url = req.url?.slice(argv.baseDir.length)
|
req.url = req.url?.slice(argv.baseDir.length)
|
||||||
|
|
||||||
const serve = async () => {
|
const serve = async () => {
|
||||||
|
const release = await buildMutex.acquire()
|
||||||
await serveHandler(req, res, {
|
await serveHandler(req, res, {
|
||||||
public: argv.output,
|
public: argv.output,
|
||||||
directoryListing: false,
|
directoryListing: false,
|
||||||
|
@ -471,6 +472,7 @@ See the [documentation](https://quartz.jzhao.xyz) for how to get started.
|
||||||
const statusString =
|
const statusString =
|
||||||
status >= 200 && status < 300 ? chalk.green(`[${status}]`) : chalk.red(`[${status}]`)
|
status >= 200 && status < 300 ? chalk.green(`[${status}]`) : chalk.red(`[${status}]`)
|
||||||
console.log(statusString + chalk.grey(` ${argv.baseDir}${req.url}`))
|
console.log(statusString + chalk.grey(` ${argv.baseDir}${req.url}`))
|
||||||
|
release()
|
||||||
}
|
}
|
||||||
|
|
||||||
const redirect = (newFp) => {
|
const redirect = (newFp) => {
|
||||||
|
|
Loading…
Reference in a new issue