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

Allow using a port other than 3000 #242

Closed
dceddia opened this issue Jul 27, 2016 · 5 comments
Closed

Allow using a port other than 3000 #242

dceddia opened this issue Jul 27, 2016 · 5 comments

Comments

@dceddia
Copy link
Contributor

dceddia commented Jul 27, 2016

I tried a search for "port"-related issues but didn't find any, so I'll make this one.

It would be nice to be able to specify a port other than 3000, either as a command line parameter or an environment variable. Some environments (Cloud9) restrict the ports you can use.

Right now, the process is pretty involved:

  1. Run "npm run eject"
  2. Wait for that to finish
  3. Edit "scripts/start.js" and find/replace "3000" with whatever port you want to use
  4. Edit "config/webpack.config.dev.js" and do the same
  5. npm start
@Jiansen
Copy link
Contributor

Jiansen commented Jul 27, 2016

It is discuss in #101 , and there is a relevant PR #243

Do you want to close this issue if your question has been addressed?

@dceddia
Copy link
Contributor Author

dceddia commented Jul 27, 2016

I'll close this, it looks like the discussion near the end of #102 is heading in this direction.

#101 and #243 don't address quite the same question. I'm not wondering how to override the port when the port is in use, but how to choose a port other than 3000 from the get-go.

@dceddia dceddia closed this as completed Jul 27, 2016
@gaearon
Copy link
Contributor

gaearon commented Jul 27, 2016

We default to PORT from environment now if it is specified. Please try the new alpha: #190

@dceddia
Copy link
Contributor Author

dceddia commented Jul 28, 2016

Awesome, thanks! PORT=xyz npm start is working in the alpha.

@gaearon
Copy link
Contributor

gaearon commented Jul 28, 2016

Released as stable.

nicosommi pushed a commit to nicosommi/create-react-app that referenced this issue Mar 17, 2018
…k#242)

* added js and jsx to things that ts-loader loads

* removed spaces and made prettier runnable on windows

* run jsx specs too

* added isejecting

* added dependencies and babeltransform

* bumped jest version#

* does it work without cache?

* cache?

* added ts

* updates ts-jest

* readd caching

* removed ts as a devdependency

* added babel to handle js files

* added prod env

* prod is handled by babel loader

* added ts as devdep

* cache node modules

* fixed legal
@lock lock bot locked and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants