System maintenance: nvm notes

nvm can be used to manage Node.js versions and switch between them quickly. I don't use it much day to day, but I had a rough memory of it, so I searched and found I'd written about it in August 2024. Back then it was to solve the problem of "npm install -g always lacking permission" — I installed nvm, expecting to use it to manage nodejs and maintain directory permissions. But I didn't end up using it to manage nodejs; instead I managed directory permissions manually, adding the path `~/.npm-global` to npm config so that `npm install -g` installed packages to a different path, which solved the permission problem. `hexo` and `yarn` were involved too, and after the change they were both installed under the `~/.npm-global` directory.

Tools

Playing “Who's the Spy” locally with an LLM

It's Chinese New Year, and everyone is talking about DeepSeek. Ruirui wants to play "Who's the Spy" but can never round up enough people, so I built an AI-powered "Who's the Spy" game bot that calls an LLM to generate character descriptions and voting strategies — but I ran into problems like unstable model output and formatting errors. After tweaking the model and the prompts over and over, I finally got the basic functionality working, and the whole process was full of funny mistakes and challenges.

AI

Nginx configuration for forwarding to a TSRPC server

Notes on deploying a TSRPC server on the Baota panel, including configuring an Nginx reverse proxy and fixing the issue where the Node.js project fails to start. Modify the Nginx configuration file, add CORS-related settings, and comment out the conflicting port listening configuration to ensure the service runs properly.

Backend Server