### Start TSRPC Backend Server - Shell Source: https://github.com/k8w/tsrpc-examples/blob/main/README.md Navigate to the backend directory of a TSRPC example project, install dependencies, and start the development server. ```Shell cd /backend npm install npm run dev ``` -------------------------------- ### Start TSRPC Frontend Server - Shell Source: https://github.com/k8w/tsrpc-examples/blob/main/README.md Navigate to the frontend directory of a TSRPC example project and install dependencies. ```Shell cd /frontend npm install ``` -------------------------------- ### Starting TSRPC Servers (Match and Room) - Shell Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-room-management/backend/README.md These shell commands are used to start the development instances of the TSRPC MatchServer and RoomServer. The third command demonstrates how to start an additional RoomServer instance for testing distributed setups. ```shell npm run dev:match npm run dev:room # 再启动一个 RoomServer (测试分布式) npm run dev:room2 ``` -------------------------------- ### Run Local Dev Server (Shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/session-and-cookie/backend/README.md Starts the local development server for the TSRPC project using the configured npm script. ```Shell npm run dev ``` -------------------------------- ### Launch Backend Services (Shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-multiplayer/README_en.md Navigate to the backend directory, install dependencies using npm, and start the local development server for the TSRPC backend application. ```Shell cd backend ### Install dependencies npm install # Start local services npm run dev ``` -------------------------------- ### Run Local TSRPC Dev Server (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/file-upload/backend/README.md Starts the TSRPC server in development mode, typically with features like hot-reloading or watching for file changes. ```Shell npm run dev ``` -------------------------------- ### Build TSRPC Server (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/file-upload/backend/README.md Compiles and prepares the TSRPC server code for production deployment. ```Shell npm run build ``` -------------------------------- ### Run TSRPC Development Server (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/serverless-faas/backend/README.md Starts the local development server for the TSRPC project. The server automatically restarts when code changes are detected, facilitating rapid development. ```shell npm run dev ``` -------------------------------- ### Build TSRPC Project (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/serverless-faas/backend/README.md Compiles or packages the TSRPC project for production or distribution. This command typically prepares the code for deployment. ```shell npm run build ``` -------------------------------- ### Build Project (Shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/session-and-cookie/backend/README.md Builds the TSRPC project, typically for production deployment or distribution, using the configured npm script. ```Shell npm run build ``` -------------------------------- ### Install Frontend Dependencies (Shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-multiplayer/README_en.md Navigate to the frontend directory and install the required NPM dependencies for the Cocos Creator project before opening it in the editor. ```Shell cd frontend ### Install the dependencies npm install ``` -------------------------------- ### Generate TSRPC API Templates (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/file-upload/backend/README.md Creates template files for implementing API handlers based on the ServiceProto definition. ```Shell npm run api ``` -------------------------------- ### Run Local Development Server (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/custom-http-res/README.md Starts the local development server for the TSRPC project using the configured npm script. ```Shell npm run dev ``` -------------------------------- ### Sync Shared Code to Client (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/file-upload/backend/README.md Synchronizes code files intended to be shared between the server and client projects. If symlinks were used during setup, this command will re-create the symlink. ```Shell npm run sync ``` -------------------------------- ### Run Local Development Server (TSRPC) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-multiplayer/backend/README.md Starts the local development server for the TSRPC project. The server automatically restarts when code changes are detected, facilitating rapid iteration during development. ```shell npm run dev ``` -------------------------------- ### Generate TSRPC API Documentation (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/serverless-faas/backend/README.md Generates API documentation for the TSRPC project. The output is typically in formats like Swagger/OpenAPI and Markdown, useful for developers and consumers of the API. ```shell npm run doc ``` -------------------------------- ### Generate API Templates (TSRPC) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-multiplayer/backend/README.md Generates API templates, which can be used as starting points for implementing new API endpoints or for client-side code generation based on the ServiceProto. ```shell npm run api ``` -------------------------------- ### Building TSRPC Server Project - Shell Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-room-management/backend/README.md This shell command executes the build process for the entire TSRPC server project, preparing it for deployment or production environments. ```shell npm run build ``` -------------------------------- ### Generate API Templates (Shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/session-and-cookie/backend/README.md Runs the npm script to generate API templates, which might be used for client-side code generation or documentation purposes. ```Shell npm run api ``` -------------------------------- ### Run Local Dev Server Shell Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/transfer-encryption/backend/README.md Executes the npm script to start the local development server for the TSRPC project. ```Shell npm run dev ``` -------------------------------- ### Run Local Dev Server (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/mongodb-crud/backend/README.md Starts the local development server for the TSRPC project using the configured npm script. ```shell npm run dev ``` -------------------------------- ### Run Local Dev Server (Shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-3.3.0/backend/README.md Starts the local development server for the TSRPC project using the configured npm script. ```shell npm run dev ``` -------------------------------- ### Run TSRPC Unit Tests (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/serverless-faas/backend/README.md Executes the unit tests for the TSRPC project. Requires the development server (`npm run dev`) to be running beforehand to ensure the test environment is active. ```shell npm run test ``` -------------------------------- ### Generate TSRPC ServiceProto (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/file-upload/backend/README.md Generates the ServiceProto file, which defines the API contract used by both the server and client. ```Shell npm run proto ``` -------------------------------- ### Generate API Documentation (TSRPC) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-multiplayer/backend/README.md Generates API documentation for the TSRPC project. This command typically produces documentation in standard formats such as Swagger/OpenAPI and Markdown. ```shell npm run doc ``` -------------------------------- ### Generate ServiceProto (Shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/session-and-cookie/backend/README.md Executes the npm script to generate the ServiceProto file, which defines the API contract for TSRPC communication. ```Shell npm run proto ``` -------------------------------- ### Build TSRPC Project Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-multiplayer/backend/README.md Builds the TSRPC project, compiling source code and preparing necessary files for deployment or distribution. This command is used to create a production-ready version of the server. ```shell npm run build ``` -------------------------------- ### Run TSRPC Local Dev Server (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/client-mock/backend/README.md Command to start the TSRPC server in local development mode, typically with hot-reloading or watch features enabled. ```Shell npm run dev ``` -------------------------------- ### Run TSRPC Server Locally (Bash) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/chatroom/backend/README.md Starts the TSRPC server in development mode using npm. This command is typically used during local development. ```bash npm run dev ``` -------------------------------- ### Run Unit Tests (TSRPC) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-multiplayer/backend/README.md Executes the unit tests defined for the TSRPC project. It is typically recommended to have the development server running (`npm run dev`) before executing this command. ```shell npm run test ``` -------------------------------- ### Run Local Dev Server (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/first-api/backend/README.md Starts the local development server for the TSRPC project, typically with hot-reloading or watch mode enabled. ```shell npm run dev ``` -------------------------------- ### Generate ServiceProto (TSRPC) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-multiplayer/backend/README.md Generates the ServiceProto file, which serves as the contract definition for the TSRPC services. This file is crucial for both server and client code generation. ```shell npm run proto ``` -------------------------------- ### Sync Shared Code Shell Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/transfer-encryption/backend/README.md Executes the npm script to synchronize shared code between the server and client. If symlinks were used during setup, it will re-create them. ```Shell npm run sync ``` -------------------------------- ### Running Local Dev Server (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-2.4.7/backend/README.md Executes the npm script to start the TSRPC server in development mode. This typically includes features like hot-reloading for faster development cycles. ```shell npm run dev ``` -------------------------------- ### Sync Shared Code to Client (Shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/session-and-cookie/backend/README.md Synchronizes shared code files from the server project to the client project using an npm script. If symlinks were initially chosen, this command will recreate the symlink instead of copying files. ```Shell npm run sync ``` -------------------------------- ### Manually Sync Shared Code (TSRPC) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-multiplayer/backend/README.md Manually synchronizes shared code files or directories within the project. This is useful when automatic synchronization is not configured or when a manual update is required. ```shell npm run sync ``` -------------------------------- ### Sync TSRPC Shared Code to Client (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/client-mock/backend/README.md Command to synchronize shared code artifacts (like ServiceProto or generated types) from the server project to the client project. If symlinks were used during setup, it will re-create the symlink. ```Shell npm run sync ``` -------------------------------- ### Sync Shared Code to Client (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/custom-http-res/README.md Synchronizes shared code files from the server project to the client project using the configured npm script. If symlinking was chosen during setup, it recreates the symlink. ```Shell npm run sync ``` -------------------------------- ### Sync TSRPC Shared Code (Bash) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/chatroom/backend/README.md Synchronizes shared code between the server and client using npm. If symlinks were chosen during setup, this command will re-create the symlink instead of copying files. ```bash npm run sync ``` -------------------------------- ### Sync Shared Code (Shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-3.3.0/backend/README.md Synchronizes shared code between the server and client using the configured npm script. If symlinks were chosen during setup, this command will re-create the symlink instead of copying files. ```shell npm run sync ``` -------------------------------- ### Syncing Shared Code (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-2.4.7/backend/README.md Executes the npm script to synchronize shared code files between the server and client directories. If symlinks were used during setup, this command will re-create the symlink instead of copying files. ```shell npm run sync ``` -------------------------------- ### Build TSRPC Server (Bash) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/chatroom/backend/README.md Builds the TSRPC server project for production using npm. This prepares the code for deployment. ```bash npm run build ``` -------------------------------- ### Build TSRPC Project (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/client-mock/backend/README.md Command to build the TSRPC server project, compiling source code and preparing it for production deployment. ```Shell npm run build ``` -------------------------------- ### Build Project (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/first-api/backend/README.md Compiles or bundles the TSRPC project code for production deployment. ```shell npm run build ``` -------------------------------- ### Generate TSRPC API Templates (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/client-mock/backend/README.md Command to generate template files for implementing API handlers based on the definitions in the ServiceProto. ```Shell npm run api ``` -------------------------------- ### Run Unit Tests (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/custom-http-res/README.md Executes the unit tests for the TSRPC project using the configured npm script. Requires the development server to be running first. ```Shell npm run test ``` -------------------------------- ### Build Project (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/custom-http-res/README.md Builds the TSRPC project for deployment or distribution using the configured npm script. ```Shell npm run build ``` -------------------------------- ### Building the Project (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-2.4.7/backend/README.md Runs the npm script to build the TSRPC server project. This command compiles the source code and prepares it for production deployment. ```shell npm run build ``` -------------------------------- ### Generate API Templates (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/first-api/backend/README.md Runs the command to generate API templates, often used for creating client-side stubs or documentation based on the ServiceProto. ```shell npm run api ``` -------------------------------- ### Build Project (Shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-3.3.0/backend/README.md Builds the TSRPC project for production deployment using the configured npm script. ```shell npm run build ``` -------------------------------- ### Build Project (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/mongodb-crud/backend/README.md Builds the TSRPC server project for production or distribution using the configured npm script. ```shell npm run build ``` -------------------------------- ### Run Unit Tests (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/mongodb-crud/backend/README.md Executes the project's unit tests using the configured npm script. Requires the development server to be running first. ```shell npm run test ``` -------------------------------- ### Generate TSRPC API Templates (Bash) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/chatroom/backend/README.md Generates API template files for the TSRPC project using npm. These templates can be used to implement the service methods. ```bash npm run api ``` -------------------------------- ### Generate TSRPC ServiceProto (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/client-mock/backend/README.md Command to generate the ServiceProto file, which defines the API contract (interfaces, types, etc.) used by both the server and client. ```Shell npm run proto ``` -------------------------------- ### Generate TSRPC ServiceProto (Bash) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/chatroom/backend/README.md Generates the ServiceProto file for the TSRPC project using npm. This file defines the service interface. ```bash npm run proto ``` -------------------------------- ### Generate API Templates (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/custom-http-res/README.md Generates API template files for the TSRPC project using the configured npm script. These templates can be used for implementing API handlers. ```Shell npm run api ``` -------------------------------- ### Generate Service Protocol (npm) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/custom-http-res/README.md Generates the ServiceProto file(s) for the TSRPC project using the configured npm script. This defines the API contract. ```Shell npm run proto ``` -------------------------------- ### Build Project Shell Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/transfer-encryption/backend/README.md Executes the npm script to build the TSRPC project, typically compiling source code and preparing for deployment. ```Shell npm run build ``` -------------------------------- ### Generating API Templates (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-2.4.7/backend/README.md Runs the npm script to generate API template files. These templates are often used on the client-side to interact with the defined server APIs. ```shell npm run api ``` -------------------------------- ### Generate ServiceProto (Shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-3.3.0/backend/README.md Generates the ServiceProto file based on the project's service definitions using the configured npm script. ```shell npm run proto ``` -------------------------------- ### Generate API Templates (Shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-3.3.0/backend/README.md Generates API templates or client code based on the ServiceProto using the configured npm script. ```shell npm run api ``` -------------------------------- ### Generate ServiceProto (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/mongodb-crud/backend/README.md Generates the ServiceProto file, which defines the service interface, using the configured npm script. ```shell npm run proto ``` -------------------------------- ### Generating ServiceProto (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/cocos-creator-2.4.7/backend/README.md Executes the npm script responsible for generating the ServiceProto file. This file defines the service interfaces and is crucial for client-server communication. ```shell npm run proto ``` -------------------------------- ### Generate ServiceProto (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/first-api/backend/README.md Executes the script to generate the ServiceProto file, which defines the API contract used by both server and client. ```shell npm run proto ``` -------------------------------- ### Generate API Templates (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/mongodb-crud/backend/README.md Generates API template files based on the service definition using the configured npm script. ```shell npm run api ``` -------------------------------- ### Generate API Templates Shell Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/transfer-encryption/backend/README.md Executes the npm script to generate API templates, likely for client-side usage or documentation based on the ServiceProto. ```Shell npm run api ``` -------------------------------- ### Generate ServiceProto Shell Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/transfer-encryption/backend/README.md Executes the npm script to generate the ServiceProto file, which defines the communication protocol for TSRPC. ```Shell npm run proto ``` -------------------------------- ### Sync Shared Code to Client (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/mongodb-crud/backend/README.md Synchronizes code intended to be shared between the server and client. If symlinks were initially chosen, this command will recreate them instead of copying files. ```shell npm run sync ``` -------------------------------- ### Sync Shared Code to Client (shell) Source: https://github.com/k8w/tsrpc-examples/blob/main/examples/first-api/backend/README.md Synchronizes code files intended to be shared between the server and client projects. If symlinks were initially configured, this command will re-create the symlink instead of copying files. ```shell npm run sync ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.