1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 07:08:01 +00:00

Add Specify Port Of CRA's Webpack Dev Server as a webpack til

This commit is contained in:
jbranchaud
2017-07-22 14:05:53 -05:00
parent 6d58793fe9
commit c37079ce76
2 changed files with 17 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
# Specify Port Of CRA's Webpack Dev Server
[`create-react-app`](https://github.com/facebookincubator/create-react-app)
gives you a set of scripts, one of which allows you to start a development
server that bundles and serves your javascript. This is handled under the
hood via `webpack-dev-server`. By default it attempts to serve from port
`3000`. If port `3000` is taken it will attempt to connect to another
sequential port.
Alternatively, you can just specify the port when starting the development
server. This can be done with the `PORT` env var.
```bash
$ PORT=3333 yarn start
```