Last active
December 3, 2025 14:32
-
-
Save anataliocs/bca289ba9738696d518df1d6e4f27b8d to your computer and use it in GitHub Desktop.
Start docusaurus and export logs to file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| touch docs.log | |
| chmod 775 docs.log | |
| nohup yarn start --port 3000 > docs.log 2>&1 & echo $! > run.pid | |
| echo "Docusaurus running on process: $(cat run.pid)" | |
| echo "Docusaurus running on port 3000" | |
| echo "" | |
| echo "View logs: tail -f docs.log" | |
| echo "Stop docusaurus: kill -9 '$(lsof -t -i:3000)'" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Logs are exported to
docs.logProcess ID is exported to
run.pid