mirror of
https://github.com/typicode/json-server.git
synced 2025-07-27 20:23:34 +08:00
Fix bin
This commit is contained in:
@ -1,3 +1,2 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
// FIXME
|
require('../lib/cli/bin')
|
||||||
require('../src/cli')()
|
|
||||||
|
1
src/cli/bin.js
Normal file
1
src/cli/bin.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
require('.')()
|
@ -19,7 +19,7 @@ const middlewareFiles = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cli (args) {
|
function cli (args) {
|
||||||
const bin = path.join(__dirname, '../..', pkg.bin)
|
const bin = path.join(__dirname, '../../src/cli/bin')
|
||||||
return cp.spawn('node', [bin, '-p', PORT].concat(args), {
|
return cp.spawn('node', [bin, '-p', PORT].concat(args), {
|
||||||
cwd: __dirname,
|
cwd: __dirname,
|
||||||
stdio: ['pipe', process.stdout, process.stderr]
|
stdio: ['pipe', process.stdout, process.stderr]
|
||||||
|
Reference in New Issue
Block a user