Documentation in reactjs.org
-
Docker
- Install Docker Desktop
- Dockerfile creates an image based on NodeJS
-
NodeJS
- Install Node.js
ℹ️ Note: you can install only one of these tools and it will work
In the project directory, you can run:
This will build an image named <image_name>
with <image_tag>
tag with the Dockerfile located in .
(actual directory).
ℹ️ Note: if you also have installed Node, you can run npm run d_build
Once the image is built, you can run:
This will run your created image <image_name>:<image_tag>
inside a container.
-it
: runs container in interactive mode
--rm
: removes container after it stops
-p 8080:3000
: links your project port 3000 to 8080
ℹ️ Note: if you also have installed Node, you can run npm run d_run
-
Open http://localhost:8080 to view it in the browser.
In the project directory, you can run:
This will run the project in the development mode by executing the command node scripts/start.js
which will run all command in start.js.
ℹ️ Note: The page will reload if you make edits and you will also see any lint errors in the console.
-
Open http://localhost:3000 to view it in the browser.