npx create-razzle-app my-appcd my-appnpm start
Then open http://localhost:3000/ to see your app. Your console should look like this:
That's it. You don't need to worry about setting up multiple webpack configs or other build tools. Just start editing
src/App.js and go!
Below is a list of commands you will probably find useful.
Runs the project in development mode.
You can view your application at
The page will reload if you make edits.
Builds the app for production to the build folder.
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
Runs the compiled app in production.
You can again view your application at
Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.
Exports a static version of the application in production mode. Must add the
export command to
package.json's scripts along with a
static_export.js file in the
src directory. See Static Site Generation for more details.
If your application is running, and you need to manually restart your server, you do not need to completely kill and rebundle your application. Instead you can just type
rs and press enter in terminal.
npm start -- --inspect=[host:port]This will start the node server and enable the inspector agent. The
=[host:port]is optional and defaults to
=127.0.0.1:9229. For more information, see this.
npm start -- --inspect-brk=[host:port]This is the same as
--inspect, but will also break before user code starts. (to give a debugger time to attach before early code runs) For more information, see this.