Git Product home page Git Product logo

Comments (7)

azu avatar azu commented on August 28, 2024 1

各package.jsonでいい気がする。

git clone https://github.com/asciidwango/js-primer.git
cd path/to/example
npm install
npm start

みたいな手順で実行できたほうが分かりやすいと思うので。(ルートだとルートでnpm installしないと見れなくて謎い感じになる)
リポジトリとして切り離せるような依存にしておくのが良さそうな気もする。

from js-primer.

azu avatar azu commented on August 28, 2024 1

Edit: node-staticがこれを満たせる

機能要件

  • http:// でアクセスできるURLを作る
  • 起動した時にアクセスする URLが表示される
  • メンテンスされている
  • Node.js 6以降で動作する

非機能要件

  • アクセスされてるリソースのログがでる
  • インストールした時に余計な警告がでない
  • npm start で叩くのでコマンドとしての使いやすさはやや置いておいてもいい

from js-primer.

keik avatar keik commented on August 28, 2024

ダウンロード数では http-server が最も使われていそうですがどうでしょう。
http://www.npmtrends.com/local-web-server-vs-static-server-vs-node-static-vs-http-server

CLI として使われることしか想定されていませんが、その分 README 的にもこっちのほうがシンプルな使い心地かなという感じがします。今回あまり関係ないですが SSL もできて微妙に便利ですね。

from js-primer.

azu avatar azu commented on August 28, 2024

https://github.com/indexzero/http-server/blob/1a8552c5e028bd5500027ee940111133927a4e94/package.json#L79 preferGlobalがついてる以外はよさそう。(npm installだけだと警告がでる系)

from js-primer.

azu avatar azu commented on August 28, 2024

static-serverのログは人間に分かりやすいので好きかも。

1 presentation npm start zsh 2016-07-07 12-50-26

どれもそんなに変わらないと思うので機能要件満たせるならどれでもいいです。

from js-primer.

lacolaco avatar lacolaco commented on August 28, 2024

ajaxappではnode-staticを使うことにしたけど特に理由はないのでのちのち必要があれば切り替える

from js-primer.

azu avatar azu commented on August 28, 2024

node-static ってことで閉じる

from js-primer.

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.