The r-plumber-react app demonstrates how to create a React application that uses R plumber as a backen. This app replicates the responsive datatables tutorial. This application uses following tools.
- Backend
- R Plumber: https://www.rplumber.io
- Node: https://nodejs.org/
- Frontend
- React: https://reactjs.org
- Vite: https://vitejs.dev
Make sure Node and NPM are installed on your machine. You may also use Yarn. To test the installation or to see if these tools are already installed on your machine, run the following commands in the terminal.
node -v
npm -vgit clone https://github.com/davidruvolo51/r-plumber-appNext, install the npm packages that are required to run the app locally. I have decided to use pnpm to manage packages on my machine and across projects. To install pnpm, run the following command.
npm install -g pnpmYou will need to install the dependencies in the root directory and in the client/ directory.
pnpm install
cd client
pnpm installIf you prefer to use npm, use the following.
npm install
cd client
npm installThis application uses renv to manage R packages. Make sure renv is installed and restore the library.
renv::restore()When you have installed everything, navigate back to the main directory and start the development server.
# if using npm
npm run dev
# if using yarn
yarn devThis will start Plumber API and parcel. The client will be hosted at localhost:8000.
