GithubHelp home page GithubHelp logo

http-server's Introduction

license Build Status npm NPM downloads

学习并仿写http-server,目前已提供基础功能。

  • 支持命令行帮助
  • 实现缓存
  • 实现压缩
  • 丰富文件夹显示页面
  • 美化404页面

快速使用

全局安装

npm i -g @careteen/http-server

在需要启动服务的地方执行下面命令

@careteen-http-server
# or 简写
@careteen-hs

默认端口是8080

查看命令帮助

@careteen-hs --help

指定端口访问

@careteen-hs --port 3000
# or
@careteen-hs -p 3000

指定主机

@careteen-hs --address 127.0.0.1
# or
@careteen-hs -a 127.0.0.1

指定特定文件夹启动服务

@careteen-hs --dir /tmp
# or
@careteen-hs -d tmp

使用文档

http-server's People

Contributors

careteenl avatar

Stargazers

 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.