A simple React App to demonstrate how to read your folders and their files from a front end library like React with using a backend Node layer. Here we have used preval.macro which creates a wrapper and server layer to create your own node module and read folders and files through it.
To get you started you can simply clone the repository:
git clone https://github.com/Rajdeepc/read-file-from-react-withour-node.git You need git to clone the repository. You can get git from http://git-scm.com/.
A number of node.js tools is necessary to initialize and test the project. You must have node.js and its package manager (npm) installed. You can get them from http://nodejs.org/. The tools/modules used in this project are listed in package.json and include express, mongodb and mongoose.
and install the dependencies
npm install npm run lint npm run buildTo Run Locally Steps to follow:
npm start git checkout masterfrom any folder in your localhttps://github.com/Rajdeepc/read-file-from-react-withour-node.gitrepositorygit pull origin masterto ensure you have the latest main codegit checkout -b the-name-of-my-branch(replacingthe-name-of-my-branchwith a suitable name) to create a branch
- Follow the "Running locally" instructions
- Save the files and check in the browser
- Changes to React components in
srcwill hot-reload - Changes to markdown files in
contentwill hot-reload - If working with plugins, you may need to remove the
.cachedirectory and restart the server
git add -A && git commit -m "My message"(replacingMy messagewith a commit message, such asFixed header logo) to stage and commit your changesgit push my-fork-name the-name-of-my-branch- Go to the ReadFilesFromReact and you should see recently pushed branches.
- Follow GitHub's instructions.
- If possible, include screenshots of visual changes. A Netlify build will also be automatically created once you make your PR so other people can see your change.
This project is licensed under the MIT License - see the LICENSE.md file for details
