Skip to content

Commit

Permalink
add note about localhost http (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov authored Sep 21, 2023
1 parent 04b33b3 commit 2d1decf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Node version 🖨️
run: node -v
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Node version 🖨️
run: node -v
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Semantic Release 🚀
uses: cycjimmy/semantic-release-action@v3
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,14 @@ start-server start http://0.0.0.0:3000 test
start-server start http://localhost:3000 test
```

If you specify just `localhost` or `127.0.0.1` or `0.0.0.0`, it automatically pings `http://...` URL.

```
start-test localhost:3000
# is the same as
start-test http://localhost:3000
```

## Note for yarn users

By default, npm is used to run scripts, however you can specify that yarn is used as follows:
Expand Down
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ function waitAndRun ({ start, url, runFn, namedArguments }) {

debug('starting server with command "%s", verbose mode?', start, isDebug())

const server = execa(start, { shell: true, stdio: ['ignore', 'inherit', 'inherit'] })
const server = execa(start, {
shell: true,
stdio: ['ignore', 'inherit', 'inherit']
})
let serverStopped

function stopServer () {
Expand Down

0 comments on commit 2d1decf

Please sign in to comment.