Coder Social home page Coder Social logo

Comments (2)

Sz-Yuan avatar Sz-Yuan commented on May 24, 2024 1

二:
使用http-server
1.下载安装nodejs
2.安装http-server
确保nodejs安装成功后在cmd运行【npm install http-server -g】指令,表示安装到全局,之后所有文件夹路径下输入http-server都可以使用。
image
3.转到你解压出compressed-dist.tgz的文件夹,右键点击在终端打开
image
4.如果右键没有在终端中打开,那么你可以先打开终端,如果你解压后的文件在D盘,运行指令【D:】回车,然后执行指令【cd xxxx(xxx表示你存放解压后文件夹的地址)】,转到文件夹所在地址后,运行【http-server -p xxxx(xxxx表示你要开启的端口)】,也可以直接使用【http-server】指令,默认端口一般为8080。
5.如果所有步骤正确会出现如下界面
ee806aae92dec08e53c90884cdf16da7

访问cmd中的地址
878ab167ad1bb8264e54865c30ffcb2f
第一个为局域网/公网访问地址,如果你没有公网,那么别人是无法访问的,
第二个为本地访问地址,只有本机可以访问
6.以图片为例,访问 【xxx/index.html(xxx表示cmd中的地址)】 或者Ctrl+左键点击访问地址,即可进入web控制界面。
d269dd597fb6845bea5989d4eaa13aef
7.在终端界面使用Ctrl+C即可关闭服务
image
8.可以使用bat脚本快捷打开web控制界面,在该文件夹内新建bat文件,
image
输入以上内容,端口可以自定义。
之后双击bat文件即可运行http-server

from metacubexd.

Sz-Yuan avatar Sz-Yuan commented on May 24, 2024

不知道你现在还需不要本地部署,但是有两个简单的方法可以本地部署。
使用vscode插件可以在vscode中进行暂时本地部署访问:

  1. 下载发行版中的compressed-dist.tgz
  2. 解压到某个本地文件夹
  3. 使用vscode打开该文件夹
    image
    4.下载插件fiveserver
    image
    5.进入index.html,右键点击Open with Five Server
    image
    这将会打开你的默认浏览器运行出该界面
    02dad519753f2a319f7daf63c3e646a4

from metacubexd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.