Application configurations are configured in /src/config/index.js
.
WARNING: At the moment, ESLint config is missing, thus linter does not really check anything.
Lint errors will be displayed in the terminal & console when you run npm run dev
.
For more details refer to the starter pack documentation about eslint here
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Starts the app in production mode, using
http-server
as the production
server.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
HTTPS=true npm run dev
Note that the server will use a self-signed certificate, so your web browser will almost definitely display a warning upon accessing the page.
To deploy the app on Heroku run the following commands:
cd $APP_NAME
git init
heroku create $APP_NAME --buildpack https://github.com/mars/create-react-app-buildpack.git
git add .
git commit -m "Deploy to Heroku" // Or any commit message
git push heroku master // Or HEAD:master if your not on the master branch
heroku open
You can adjust various development and production settings by setting environment variables in your shell or with .env.
Variable | Development | Production | Usage |
---|---|---|---|
BROWSER | ✅ | ❌ | By default, Create React App will open the default system browser, favoring Chrome on macOS. Specify a browser to override this behavior, or set it to none to disable it completely. |
HOST | ✅ | ❌ | By default, the development web server binds to localhost . You may use this variable to specify a different host. |
PORT | ✅ | ❌ | By default, the development web server will attempt to listen on port 3000 or prompt you to attempt the next available port. You may use this variable to specify a different port. |
HTTPS | ✅ | ❌ | When set to true , Create React App will run the development server in https mode. |
PUBLIC_URL | ❌ | ✅ | Create React App assumes your application is hosted at the serving web server's root or a subpath as specified in package.json (homepage ). Normally, Create React App ignores the hostname. You may use this variable to force assets to be referenced verbatim to the url you provide (hostname included). This may be particularly useful when using a CDN to host your application. |
CI | 🔶 | ✅ | When set to true , Create React App treats warnings as failures in the build. It also makes the test runner non-watching. Most CIs set this flag by default. |