# code-service **Repository Path**: codemiao08/code-service ## Basic Information - **Project Name**: code-service - **Description**: 一款简易的命令行服务器软件 - **Primary Language**: JavaScript - **License**: AGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2023-04-05 - **Last Updated**: 2023-07-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Code Service Code Service是一款基于Nodejs的简易的命令行静态服务器工具。操作方式简单,仅需一行命令即可开启服务器。对于前端初学者是一个很好的选择。 ## 安装 目前,Code Service使用npm来安装。请先确认系统有安装Nodejs和npm。 Nodejs的安装见 [nodejs.org](https://www.nodejs.org)。 ### npm安装 打开系统终端,在终端输入以下命令: ``` powershell npm install -g code-service ``` 安装完成后,输入命令: ```powershell code-service --version ``` 将会显示: ```powershell 1.0.0 ``` 说明已经安装成功。 ## 使用教程 ```powershell code-service [端口号] ``` 在需要部署服务器的目录打开终端,输入命令: ```powershell code-service 5500 ``` 将会显示: ```powershell 服务器已运行在 127.0.0.1:5500 ``` 说明服务器启动成功了。在浏览器打开 http://127.0.0.1:5500/ 将会看到你的页面。 ## 帮助 在终端输入命令: ```powershell code-service --help ``` 可获取更多帮助。