mexe/html-server — pull request #6 by vitkarpov (2014-01-25 17:11:47+00:00)
Title: Get rid of config

So, what is it all about.

I found that `server.config.json` is really really overwhelming.
Common project structure for html-guy is "all content in one folder" — `css`, `js`, `fonts`, `dummy`, ... , index.html, news.html, ...

So, it's really convenient to specify just a basepath for all that stuff. And this data could be retrieved from the CLI.

For instance,

```
$ node ./node_modules/html-server/server.js -port=8000 -basepath=build/
```

In this case server will resolve all absolute paths '/' relative to the specified basepath. There are all rules for unix's `cd` in action.

If you set `-basepath=build/` it would be resolved relative to the current local folder (folder with your project, where server's running), and '-basepath=/build/' would be resoved to the root of your filesystem.

Also, I think that rule `/:page` for router is one possible, and it's not necessary to specify ext for pages — it's always `html`.