remixz / run-js

A prototyping server that just works.
MIT License
188 stars 12 forks source link

Request for bundle fails under Windows when accessing root page #11

Closed hugollm closed 8 years ago

hugollm commented 8 years ago

Request for bundle fails under Windows when accessing root page (/).

Request URL:http://localhost:60274/__bundle//index.js.bundle.js
Request Method:GET
Status Code:404 Not Found

In this example I tried creating a simple index.js file and GET /. When I tried to GET /index.js it worked just fine. My guess is that it has to do with Windows different directory separator \.

node -v && run-js --version
v4.3.0
2.0.1
tunnckoCore commented 8 years ago

My guess is that it has to do with Windows different directory separator .

Maybe, but on some underlying shit (express) package/middleware, i dont think it is run-js problem - i mean, in first glance it looks good, it uses path module which as i know dont have problems for such windows shits :D (note: damn, sorry for my aggressive ton, i hate windows ;d)

Cheers :beer: :)

tunnckoCore commented 8 years ago

Or the double slash thing (__bundle//) setting here lib/routes/bundle-file.js#L19

hugollm commented 8 years ago

Indeed I would prefer to be working on linux, but since I have to communicate with an C# API in a Windows project, It would be a pain to be switching between operational systems.

Since I bumped into this, I'm using prot for now. If I have the time, maybe I'll come back to this issue and try to solve it (since prot is not being actively maintained).

remixz commented 8 years ago

Thanks for catching this! This should be fixed with v2.1.0, which I've just published on npm. Let me know if you run into any other issues on Windows.

hugollm commented 8 years ago

Works like a charm. Great Job!