angular / angular-phonecat

Tutorial on building an angular application.
http://docs.angularjs.org/tutorial
MIT License
3.12k stars 4.66k forks source link

ctrl - c does not truly shutdown http-server #420

Closed jrtobac closed 7 years ago

jrtobac commented 7 years ago

I am on step 0 of the phonecat app tutorial. I am on Windows 10, and using a cygwin console.

When I run npm start, the app starts fine, and I can see the generated angular website at http://localhost:8000/index.html. My console prompts me to hit ctrl-c to stop the server.

When I hit ctrl-c the server appears to stop and my console returns to its normal screen. I even run ps aux to be sure that everything stopped running.

However, if I navigate back to http://localhost:8000/index.html, I am still able to see the website, and cygwin displays messages as though the server is still running.

Messages from cygwin console:

$ npm start

angular-phonecat@0.0.0 prestart C:\cygwin64\home\User\angular-phonecat npm install

angular-phonecat@0.0.0 postinstall C:\cygwin64\home\User\angular-phonecat bower install

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

angular-phonecat@0.0.0 start C:\cygwin64\home\User\angular-phonecat http-server ./app -a localhost -p 8000 -c-1

Starting up http-server, serving ./app Available on: http://localhost:8000 Hit CTRL-C to stop the server

This is where I hit ctrl-C and the console returns to normal until I navigate to the website again and I get:

User@DESKTOP-MTQB35F ~/angular-phonecat $ [Thu Aug 24 2017 01:28:20 GMT-0400 (Eastern Daylight Time)] "GET /index.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36" [Thu Aug 24 2017 01:28:20 GMT-0400 (Eastern Daylight Time)] "GET /bower_components/bootstrap/dist/css/bootstrap.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36" [Thu Aug 24 2017 01:28:20 GMT-0400 (Eastern Daylight Time)] "GET /bower_components/angular/angular.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36"

The only way that I have been able to effectively shutdown the server is by starting the task manager and stopping cygwin from running.

Why is this happening and how can I successfully shutdown http-server without having to kill cygwin entirely?

gkalpak commented 7 years ago

This doesn't sound like an angular-phonecat issue. It is either an http-server or (more likely) a cygwin issue. Closing since there is nothing we can do in angular-phonecat. Please use their respective support channels.