mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-13 10:39:38 -06:00
Fixes Windows compatibility caused by https://github.com/indexzero/http-server/issues/525 And, serve is better maintained than http-server or ecstatic.
13 lines
280 B
JavaScript
13 lines
280 B
JavaScript
const handler = require('serve-handler')
|
|
const http = require('http')
|
|
|
|
module.exports = function createServer (options) {
|
|
const server = http.createServer((request, response) => {
|
|
return handler(request, response, {
|
|
public: options.root
|
|
})
|
|
})
|
|
|
|
return server
|
|
}
|