Presumming you have Node.js already installed. If you don't, there is a short tutorial on how to install Node.js using Homebrew.

You need to create a development server for your test projects. React is a good choice for serving your test project on a localhost. For this to work properly, you will need to use sudo and install globally. This gives the app nessessary permisions to create sockets so you can visit the frontend.

sudo npm install -g create-react-app

You will have to create a react-app directory which will be used to serve the frontend to the browser.

create-react-app dapp
cd ~/Sites/dapp

Once all the packages are installed, start a React server to serve your test project from the dapp directory;

npm start

Create-React-App should automatically render on http://localhost:3000/.

Once your server runs without errors, you will be able to create projects in the dapp directory and they will serve