Getting Started With Sample App Locally

Getting Started With Sample App Locally

Before proceeding, you'll need to have the last stable NodeJS and npm installed on your machine.You can use nvm (macOS/Linux) or nvm-windows to switch Node versions between different projects.

The source code for this app can be accessed on GitHub here Sample App Source Code.

Install dependencies

Open the project folder and install its dependencies. You can use any package manager you want: Yarn or npm. There might be other package managers that were not listed here.

cd project-folder
npm install

Start development server

Once the installation is done, you can now run your app by running npm run dev or yarn dev.

npm run dev

You will see something similar to:

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - automatically enabled Fast Refresh for 1 custom loader
event - compiled successfully in 4.7s (1535 modules)

This runs the app in development mode. Open localhost:3000 to view it in the browser.

While in development mode, the page will automatically reload if you make changes to the code. Should you have any, you will see the build errors and lint warnings in the console.

The app uses ESLint, so you will get detailed warnings and errors as well as best practice hints.

Build project files

npm run build

or yarn build

Builds the app for production to the build folder. It correctly bundles React in production mode and optimizes the build for the best performance.

Last updated