This redesign of my website would not be possible without the incredible work by Anders Evenrud on OS.js. As you can see in the majority of the files, this monorepo is a modified amalgamation of the OS.js source code.
- Run the following commands and update the generated files with your own information:
cp apps/old-site/.env.template apps/old-site/.env
cp apps/terminal/scripts/.env.template apps/terminal/scripts/.env
cp website/src/client/.env.template website/src/client/.env
cp website/src/server/auth/template.env.json website/src/server/auth/.env.json- Run the following commands to setup the project:
bash ./scripts/setup.shbash ./scripts/deploy.sh- Can use
--no-resetfor local deployment testing, so you don't lose your changes
- Can use
- Running
pm2 monitwill allow you to track when the server has finished initializing
For more information, see this guide.
If you encounter the error EADDRINUSE, Address already in use on Windows, run taskkill /F /IM node.exe.
To see if the port is already in use on Linux, run netstat -tulpn | grep LISTEN. If you need to free the port, you can likely run sudo pkill -9 node. Alternatively, you can run the command sudo fuser -k 8000/tcp until there is no output, then the port will be guaranteed to be free.
To see if your process is still runninng, run pm2 list.
To monitor the logs from your process, run pm2 monit.
To run GitHub Actions locally, do the following:
curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bashsudo ./bin/act -s GITHUB_TOKEN=ENTER_YOUR_PAT_HERE- Select "Medium" as the image size
winget install nektos.act- Open a new terminal
- Ensure that Docker Desktop is running
docker pull catthehacker/ubuntu:act-latestact --pull=false -s GITHUB_TOKEN=ENTER_YOUR_PAT_HERE- Select "Medium" as the image size
To build the project, run:
cd website
rush build
pnpm run deployEnsure you have properly updated website/src/server/auth/.env.json to not include the placeholder comments.
You can run pnpm run build:production to build the project in production mode, otherwise it will be built in development mode.
To run the test suite, run:
rush build
rush testTo refresh the shared Browserslist cache and silence caniuse-lite warnings, run:
rush update:browserslistThis command invokes the helper in scripts/update-browserslist-db.mjs to update the central pnpm-lock.yaml used by every package and deduplicate caniuse-lite versions in the lockfile. After refreshing the lockfile, run rush update --purge so the next install pulls the new caniuse-lite data instead of reusing cached dependencies.
To publish changes to MeeseOS, use the following command:
rush --debug publish --publish --include-all --set-access-level publicYou can specify which registry you want to publish by adding one of the following flags:
- GitHub Packages:
--registry https://npm.pkg.github.com - NPM:
--registry https://registry.npmjs.org
If you want to do a dry run first, run rush publish --include-all. You will have to set your environmental variables based on the repository you are publishing to, either NPM_AUTH_TOKEN or GH_AUTH_TOKEN.
This repository is configured to take advantage of Rush's build cache. Each package defines a config/rush-project.json file so that rush build --verbose can reuse cached output when available while intentionally skipping caching for tooling packages that do not emit build artifacts.