GithubHelp home page GithubHelp logo

serverany's Introduction

serverany

任意文件夹的静态服务能力,可以在任意文件夹下启动服务,基于 mock-proxy-autocookie 工具,支持 mock 和 proxy 能力的本地静态服务器

  // 安装
  npm install serverany -g
  // 启动服务
  serverany --index index.html --base ${cwd} --config config.js --port 8800
  • --index 配置访问的页面地址,默认值index.html,即在--base文件夹下的index.html
  • --base 获取相对地址的基准路径,默认为执行serverany的目录
  • --config mock proxy配置文件地址,默认为config.js,即在--base文件夹下的config.js,配置请参考mock-proxy-autocookie
  • --port 默认的服务端口,默认http端口为8800,https端口基于http端口+1

注意:如果配置的路径以“/”开头,那么认为是绝对地址,不再基于--base进行查找。

serverany's People

Contributors

zhangshaolong avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.