Skip to content

agusluques/react-tutorial

Repository files navigation

React

Documentation in reactjs.org

Pre-requisites

ℹ️ Note: you can install only one of these tools and it will work

Run Project

With Docker:

In the project directory, you can run:

  • docker build -t <image_name>:<image_tag> .

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:

  • docker run -it --rm -p 8080:3000 <image_name>:<image_tag>

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

With Node:

In the project directory, you can run:

  • npm start

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.

Apps

POCs