npm serve code example
Example 1: serve build node npm
# in terminal cd to project root dir
# to build project:
npm run build
# to serve/host project locally:
serve -s ./build
Example 2: server npm
npm install --global http-server
# in terminal cd to project root dir
# to build project:
npm run build
# to serve/host project locally:
serve -s ./build
npm install --global http-server