Git Product home page Git Product logo

dev-web-server's People

Contributors

manufitoussi avatar manufitoussiwit avatar richardbradley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

richardbradley

dev-web-server's Issues

"DELAY" doesn't work for static files

I wasn't able to get the "DELAY" argument to work. Did I do something wrong, or is it broken?

Steps to reproduce:

$ uname -a
Linux ip-10-56-35-5.eu-west-1.compute.internal 2.6.32-696.el6.x86_64 #1 SMP Tue Mar 21 19:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/*release
CentOS release 6.9 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
CentOS release 6.9 (Final)
CentOS release 6.9 (Final)

$ npm install dev-web-server
/home/richard_bradley
└── [email protected]

$ echo OK > example.txt

$ node ./node_modules/.bin/dev-web-server DELAY 10000  &
[1] 22351
DEV WEB SERVER - v1.6.1
Server running at http://localhost:8080/
Type [Ctrl+C] to stop the server.

$ time curl localhost:8080/example.txt
------------------------
time: 2017-04-11T11:12:01.135Z
method: GET
url: /example.txt
filePath: /home/richard_bradley/example.txt
base: example.txt
ext: .txt
dir: /home/richard_bradley
OK

real    0m0.007s
user    0m0.001s
sys     0m0.002s

Expected result:

The "curl" command above should take 10s to complete, as per the "DELAY 10000" argument

Observed result:

The curl command completed instantly

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.