1 |
|
2 | const co = require('co')
|
3 | const prompt = require('co-prompt')
|
4 | const config = require('../templates')
|
5 | const chalk = require('chalk')
|
6 | const fs = require('fs')
|
7 | const child_process = require('child_process')
|
8 |
|
9 |
|
10 |
|
11 | module.exports = (option) => {
|
12 |
|
13 | console.log(`server is running port at ${option}`)
|
14 |
|
15 | function exec(cmd) {
|
16 | return child_process.execSync(`http-server -p ${option}`).toString().trim()
|
17 | }
|
18 | exec()
|
19 | }
|