6. Port Forwarding
Port forwarding is used to use truffle unbox react to create a project with a react front-end. For using it, create a project, go to the Logger module, click on the "Terminal" panel, choose "npm-truffle" and write the below-mentioned command line.
1
truffle unbox react
Copied!
Once you write down this command in the command line, all the libraries for the truffle to create a project with react front-end would be installed and can be accessed from the "Explorer" section, as shown in the figure below.
Supported commands are highlighted in the figure below.
Next, compile and deploy using the below-mentioned commands.
1
truffle develop
2
compile
3
migrate
Copied!
Once you compile these commands, you can see an output as shown in the figure below.
After deployment, it will be successfully displayed in the browser.

Add a port

Click Ports Click the Add Port button and enter 3000 in the input box and click the Add button to add a port of 3000. After that, we can view the running project through the local address.
Copy link
Contents
Add a port