manufitoussi / dev-web-server Goto Github PK
View Code? Open in Web Editor NEWA simple Node web local server for developments.
A simple Node web local server for developments.
dev-web-server
env: node\r: No such file or directory
Solution:
dos2unix /Users/yamass/.config/yarn/global/node_modules/dev-web-server/web-server/app.js
I wasn't able to get the "DELAY" argument to work. Did I do something wrong, or is it broken?
$ 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
The "curl" command above should take 10s to complete, as per the "DELAY 10000" argument
The curl
command completed instantly
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.