Skip to content

Commit 0137deb

Browse files
authored
Boot up http server in cli (#406)
1 parent 984982f commit 0137deb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/micro/bin/micro.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env node
22

33
// Native
4+
const http = require('http');
45
const path = require('path');
56
const {existsSync} = require('fs');
67

@@ -194,7 +195,7 @@ function registerShutdown(fn) {
194195
}
195196

196197
function startEndpoint(module, endpoint) {
197-
const server = serve(module);
198+
const server = new http.Server(serve(module));
198199

199200
server.on('error', err => {
200201
console.error('micro:', err.stack);

0 commit comments

Comments
 (0)