Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add note about localhost http #372

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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