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 build
To Run Locally Steps to follow:
npm start
git checkout master
from any folder in your localhttps://github.com/Rajdeepc/read-file-from-react-withour-node.git
repositorygit pull origin master
to ensure you have the latest main codegit checkout -b the-name-of-my-branch
(replacingthe-name-of-my-branch
with 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
src
will hot-reload - Changes to markdown files in
content
will hot-reload - If working with plugins, you may need to remove the
.cache
directory and restart the server
git add -A && git commit -m "My message"
(replacingMy message
with 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